On Thursday, May 15, 2014 08:21:41 PM JR via Digitalmars-d-learn wrote: > On Thursday, 15 May 2014 at 18:15:46 UTC, Charles Hixson via > > Digitalmars-d-learn wrote: > > Duration can be specified in nanoseconds, but does it make any > > sense > > to have a value of 1 nanosecond? 0? > > > > My desire is to check whether a message is in the queue, and > > then > > either move it local to the thread, or continue, depending. > > I use 0.seconds for such oneshot receive attempts. Snippet: > > while (!halt) { > if (++readCounter > messageCheckFrequency) { > receiveTimeout(0.seconds, > &_verbose.fun, > &_quiet.fun, > &_unknown.fun > ); > > readCounter = 0; > } > > slice = conn.stream.readLine(buf); > // ... > } Thanks. That's what I was hoping to hear.
Re: receiveTimeout minimum reasonable timeout value?
Charles Hixson via Digitalmars-d-learn Thu, 15 May 2014 16:59:26 -0700
- receiveTimeout minimum reasonable t... Charles Hixson via Digitalmars-d-learn
- Re: receiveTimeout minimum rea... JR via Digitalmars-d-learn
- Re: receiveTimeout minimum... Charles Hixson via Digitalmars-d-learn