Use NumCPU and not GOMAXPROCS
This commit is contained in:
		
							parent
							
								
									5366d0f652
								
							
						
					
					
						commit
						f889a193bf
					
				|  | @ -304,7 +304,7 @@ func (c *Configuration) EnsureFilePermissions() error { | ||||||
| 		return errors.WithStack(err) | 		return errors.WithStack(err) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	pool := workerpool.New(runtime.GOMAXPROCS(0)) | 	pool := workerpool.New(runtime.NumCPU()) | ||||||
| 
 | 
 | ||||||
| 	for _, file := range files { | 	for _, file := range files { | ||||||
| 		f := file | 		f := file | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ import ( | ||||||
| // Parent function that will update all of the defined configuration files for a server
 | // Parent function that will update all of the defined configuration files for a server
 | ||||||
| // automatically to ensure that they always use the specified values.
 | // automatically to ensure that they always use the specified values.
 | ||||||
| func (s *Server) UpdateConfigurationFiles() { | func (s *Server) UpdateConfigurationFiles() { | ||||||
| 	pool := workerpool.New(runtime.GOMAXPROCS(0)) | 	pool := workerpool.New(runtime.NumCPU()) | ||||||
| 
 | 
 | ||||||
| 	files := s.ProcessConfiguration().ConfigurationFiles | 	files := s.ProcessConfiguration().ConfigurationFiles | ||||||
| 	for _, cf := range files { | 	for _, cf := range files { | ||||||
|  |  | ||||||
|  | @ -39,7 +39,7 @@ func newPooledWalker(fs *Filesystem) *PooledFileWalker { | ||||||
| 		// Create a worker pool that is the same size as the number of processors available on the
 | 		// Create a worker pool that is the same size as the number of processors available on the
 | ||||||
| 		// system. Going much higher doesn't provide much of a performance boost, and is only more
 | 		// system. Going much higher doesn't provide much of a performance boost, and is only more
 | ||||||
| 		// likely to lead to resource overloading anyways.
 | 		// likely to lead to resource overloading anyways.
 | ||||||
| 		pool: workerpool.New(runtime.GOMAXPROCS(0)), | 		pool: workerpool.New(runtime.NumCPU()), | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user