mirror of
				https://github.com/winfsp/winfsp.git
				synced 2025-10-30 03:28:38 -05:00 
			
		
		
		
	dll: FspFileSystemStartDispatcher
Change default number of threads when ThreadCount==0 is passed. New min DEFAULT number of threads is 4 and new max DEFAULT number of threads is 16. The absolute minimum number of threads that any file system dispatcher has remains 2.
This commit is contained in:
		| @@ -24,6 +24,8 @@ | ||||
| enum | ||||
| { | ||||
|     FspFileSystemDispatcherThreadCountMin = 2, | ||||
|     FspFileSystemDispatcherDefaultThreadCountMin = 4, | ||||
|     FspFileSystemDispatcherDefaultThreadCountMax = 16, | ||||
| }; | ||||
|  | ||||
| static FSP_FILE_SYSTEM_INTERFACE FspFileSystemNullInterface; | ||||
| @@ -636,6 +638,11 @@ FSP_API NTSTATUS FspFileSystemStartDispatcher(FSP_FILE_SYSTEM *FileSystem, ULONG | ||||
|  | ||||
|         for (ThreadCount = 0; 0 != ProcessMask; ProcessMask >>= 1) | ||||
|             ThreadCount += ProcessMask & 1; | ||||
|  | ||||
|         if (ThreadCount < FspFileSystemDispatcherDefaultThreadCountMin) | ||||
|             ThreadCount = FspFileSystemDispatcherDefaultThreadCountMin; | ||||
|         else if (ThreadCount > FspFileSystemDispatcherDefaultThreadCountMax) | ||||
|             ThreadCount = FspFileSystemDispatcherDefaultThreadCountMax; | ||||
|     } | ||||
|  | ||||
|     if (ThreadCount < FspFileSystemDispatcherThreadCountMin) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user