Obedient threads
    Chris via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Thu Oct  2 06:49:33 PDT 2014
    
    
  
On Thursday, 2 October 2014 at 13:05:00 UTC, ketmar via 
Digitalmars-d-learn wrote:
> On Thu, 02 Oct 2014 11:36:06 +0000
> Chris via Digitalmars-d-learn 
> <digitalmars-d-learn at puremagic.com> wrote:
>
> you can use receiveTimeout! to check if there is some message 
> available.
That won't do. It blocks the main thread too (for the duration of 
timeout), and it might abandon the thread too early. If you do it 
like in Ali's example[1], the main thread is blocked in the sense 
that it does not listen to input.
[1] http://ddili.org/ders/d.en/concurrency.html
    
    
More information about the Digitalmars-d-learn
mailing list