G
Guest
Hi All,
I hvae worker class to manage the application
inside worker : worker creates (n) number of threads to do IO operations.
The Problem Is:
to handle all threads : [create new] , [process finished] , [clean all]
I have to keep worker process inside while statement:
while (true)
...
and it takes 50% of cpu all time!
I'm wondering how can I use events to keep worker sleep until one of the
opetations threads finish?
NOTE: event must wake worker thread with event args.
AND NOTE : worker thread must be diffrent thread than IO threads.
Thank u
[ i'm using : C# 2005 beta 2 ]
I hvae worker class to manage the application
inside worker : worker creates (n) number of threads to do IO operations.
The Problem Is:
to handle all threads : [create new] , [process finished] , [clean all]
I have to keep worker process inside while statement:
while (true)
...
and it takes 50% of cpu all time!
I'm wondering how can I use events to keep worker sleep until one of the
opetations threads finish?
NOTE: event must wake worker thread with event args.
AND NOTE : worker thread must be diffrent thread than IO threads.
Thank u
[ i'm using : C# 2005 beta 2 ]