Thread Sleep
Jonathan M Davis
jmdavisProg at gmx.com
Mon Aug 8 00:09:33 PDT 2011
On Monday 08 August 2011 07:01:11 BizarreCake wrote:
> I wonder why there isn't any sleep method in std.concurrency.
> I know there is one in core.thread, but I try to avoid using
> core modules.
>
> Maybe a sleep method is just not needed in std.concurrency?
>
> If I were to make a program that would constantly have about
> 60 working threads. Some kind of sleeping mechanism is a must
> in my opinion.
>
> Someone please answer! ^^
> Thanks.
It's not there, because it's in core.thread. We're not going to duplicate code
just so that it's in std instead of core. If the functionality that you need
is in core, then use core. I don't see any reason to avoid it beyond the fact
that a large portion of it is C declarations which Phobos uses to implement
nicer, D functions which are then what you'd use. But if it's D code, then
there's no reason not to use it. It's there to be used, and it's not going to
be duplicated in std.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list