Mutex
Simple synchronisation sample one with an unnamed synchronisation object
(mutex) one with a named one
Example of the use of multiple waiting to avoid deadlock when accessing two shared
resources, both controlled by Mutex objects.
The first shared resource is a memory buffer and the second is the screen. Two threads
each store a string of twenty letters in the shared memory buffer. Two other threads each
display a string of twenty numbers on the screen. A further two threads monitor the
contents of the memory buffers and display the results on the screen.

Feel free to contact us for
general information, questions or comments |