C
Cyril ZEKSER
Guest
Hi all,
I'm using the FileSystemWatcher to perform simple tasks (mainly Print) on newly created files.
I've noted than it is using thread pool to launch events. the job is done well, but here is the trace I've seen :
FileSystemWatcher Created thread 5 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X15_000096.jpg
FileSystemWatcher : PRINT LABEL
FileSystemWatcher Created thread 4 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X03_001167.jpg
FileSystemWatcher : PRINT LABEL
FileSystemWatcher Created thread 4 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X04_000786.jpg
FileSystemWatcher : PRINT LABEL
FileSystemWatcher Created thread 4 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X05_001142.jpg
FileSystemWatcher : PRINT LABEL
FileSystemWatcher Created thread 4 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X06_001129.jpg
FileSystemWatcher : PRINT LABEL
FileSystemWatcher Created thread 4 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X07_001171.jpg
FileSystemWatcher : PRINT LABEL
It seems that only the first event is using Thread #5, all others events are using thread #4, this is the reason why I think this watcher is mono-thread only...
I'm out of solutions since I need to parallelize printing (at least 4 in //) but I don't know how to :
1/ Raise the number of thread the watcher can use (ThreadPool.GetMaxThread gives me 32767)
2/ Make it really multi-thread
3/ use another solution... but which one.
Does anyone can help me ?
Thank in advance
Cyril
Continue reading...
I'm using the FileSystemWatcher to perform simple tasks (mainly Print) on newly created files.
I've noted than it is using thread pool to launch events. the job is done well, but here is the trace I've seen :
FileSystemWatcher Created thread 5 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X15_000096.jpg
FileSystemWatcher : PRINT LABEL
FileSystemWatcher Created thread 4 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X03_001167.jpg
FileSystemWatcher : PRINT LABEL
FileSystemWatcher Created thread 4 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X04_000786.jpg
FileSystemWatcher : PRINT LABEL
FileSystemWatcher Created thread 4 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X05_001142.jpg
FileSystemWatcher : PRINT LABEL
FileSystemWatcher Created thread 4 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X06_001129.jpg
FileSystemWatcher : PRINT LABEL
FileSystemWatcher Created thread 4 - file : E:\Dev\SandBox\EventTest\print\labels\PRINT_Y01-X07_001171.jpg
FileSystemWatcher : PRINT LABEL
It seems that only the first event is using Thread #5, all others events are using thread #4, this is the reason why I think this watcher is mono-thread only...
I'm out of solutions since I need to parallelize printing (at least 4 in //) but I don't know how to :
1/ Raise the number of thread the watcher can use (ThreadPool.GetMaxThread gives me 32767)
2/ Make it really multi-thread
3/ use another solution... but which one.
Does anyone can help me ?
Thank in advance
Cyril
Continue reading...