[dmd-concurrency] Shutdown protocol
Sean Kelly
sean at invisibleduck.org
Thu Jan 21 12:12:18 PST 2010
On Jan 21, 2010, at 11:28 AM, Andrei Alexandrescu wrote:
> Steve Schveighoffer wrote:
>> ----- Original Message ----
>>> From: Andrei Alexandrescu <andrei at erdani.com>
>>> Steve Schveighoffer wrote:
>>>> foreach(tid; tids) {tid.join();}
>>> Oh btw that shouldn't be coded like that, it's slow. Must be something like:
>>>
>>> joinAll(tids);
>>>
>>> so joining is initiated in parallel.
>>>
>> What does joinAll do? I admit I am not too familiar with your proposed API.
>
> The idea is to join on all threads in parallel. Otherwise, if you have N threads, the Nth will become aware you plan to shutdown only after all others have already finished.
But joining just waits for the thread, it doesn't tell it anything. Or am I misunderstanding what join() does in this API?
More information about the dmd-concurrency
mailing list