How to Handle Comman (Static resources) in case of multiple threads
Multiple threads
Collapse
X
-
You should protect the common resource with a mutex (a synchronized blockOriginally posted by ashi1290How to Handle Comman (Static resources) in case of multiple threads
of code) for exclusive write actions. If the resource allows concurrent reads you
need to protect it with a Semaphore as well (read the API docs for this
class). Also google for the CREW mechanism (Concurrent Reads Exclusive Writes).
kind regards,
Jos
Comment