Yes. I've been through a gamut of variations using yield() and sleeps. The problem, besides that using either renders the communications so slow as to totally invalidate any benefits from the threading, is that as soon as you move the code to a multi-processor system, you are into a completely different set of dynamics and need to start again.
This should not be necessary. It certainly isn't needed if you use the native threading facilities provided by my OS.
Have you considered using threads::shared::semaphore instead?
Have you looked at what Thread::Semaphore actually does?
In reply to Re^2: Printing to STDERR causes deadlocks.
by BrowserUk
in thread Printing to STDERR causes deadlocks.
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |