August 2002
Intermediate to advanced
944 pages
22h 32m
English
We’ve examined some basic synchronization techniques, but they are not appropriate for every situation when you’re handling multiple threads. Let’s look at some additional techniques you can use for implementing more advanced cooperation and communication between threads.
You’ve learned how to use the Monitor class to perform exclusive locking using a sync object. But consider a common scenario from the world of computer science: that of producers and consumers.
A producer is an object that creates resources. A consumer is an object that obtains resources from a producer. A simple producer might implement an iterative process, creating one resource after another. A consumer will wait until a resource ...
Read now
Unlock full access