sleepy receiveTimeout?

Jonathan M Davis jmdavisProg at gmx.com
Sat Dec 18 13:46:38 PST 2010


On Saturday 18 December 2010 13:22:52 Joost 't Hart wrote:
> Hi,
> 
> (also posted on news.gmane.org, but does not seem to appear there)
> 
> New to this group and to D, but getting "into" it fast.

Welcome!

> Came across a problem.
> 
> 2.050 / Linux
> 
> 1) On windows we can get any (std.concurrency, which is what I use in my
> project) thread to sleep using Sleep() from core.sys.windows.windows. I
> cannot find the alternative under Linux...
> 
> Is there one?

You're using the wrong function (see http://is.gd/iYySf ). The correct function 
is core.Thread.sleep(). It works on both Windows and Linux. It's a static 
function which should work just fine regardless of whether you're using Thread 
directly or using spawn().

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list