Proper way to code multithreaded applications?

Regan Heath regan at netmail.co.nz
Fri Jun 1 16:51:34 PDT 2007


Sean Kelly Wrote:
> This is only an issue because Phobos threads lack a sleep() routine. 
> Tango threads do not.  And to reply to Regan as well, nanosleep isn't 
> available everywhere either :-)  The most commonly implemented methods 
> are sleep() and usleep() in <unistd.h>.  In fact, I think these may 
> actually be required (nanosleep is a part of the realtime extensions IIRC).

Oops, I didn't mean to imply nanosleep was available everywhere, I was trying to suggest what you did;  to use sleep(), usleep(), or nanosleep() for Posix, and Sleep() or SleepEx() for Win32.  ;)

Regan Heath




More information about the Digitalmars-d-learn mailing list