... continued
Continues the discussion on the Monitor class.
We'll cover the following...
We'll cover the following...
Ping Pong Example
We can rewrite our ping-pong example without busy waiting using Monitor. The two threads Wait() and Pulse() to not busy wait. The code is self-explanatory and appears below, the widget runs for ten seconds and then timees out.