Threadpools, difference between DMD and LDC
Philippe Sigaud via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Aug 4 05:05:24 PDT 2014
> Without going into much detail: Threads are heavy, and creating a thread is
> an expensive operation (which is partially why virtually every standard
> library includes a ThreadPool).
> I haven't looked into detail your code, but consider using the TaskPool if
> you just want to schedule some tasks to run amongst a few threads, or
> potentially using Fibers (which are fairly light-weight) instead of Threads.
OK, I get it. Just to be sure, there is no ThreadPool in Phobos or in
core, right?
IIRC, there are fibers somewhere in core, I'll have a look. I also
heard the vibe.d has them.
More information about the Digitalmars-d-learn
mailing list