Multiple threads

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashi1290
    New Member
    • Feb 2008
    • 6

    Multiple threads

    How to Handle Comman (Static resources) in case of multiple threads
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by ashi1290
    How to Handle Comman (Static resources) in case of multiple threads
    You should protect the common resource with a mutex (a synchronized block
    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

    Working...