Producer/Consumer

I have tried to come-up with a thread safe and a non thread safe version of a typical producer/consumer scenario.

Run this with

boolean THREAD_SAFE_EXECUTION = true;

and

boolean THREAD_SAFE_EXECUTION = false;

And see the difference yourself :).

Leave a Reply

Your email address will not be published. Required fields are marked *