How to implement Canceleable spawn() from parent

Steven Schveighoffer schveiguy at gmail.com
Tue Jun 30 13:57:49 UTC 2020


On 6/30/20 9:44 AM, aberba wrote:
> On Tuesday, 30 June 2020 at 12:48:32 UTC, Simen Kjærås wrote:

>>
>> So I guess the error is elsewhere, but I'm not sure where and how.
> 
> Yeah, you're right. I changed receiveTimeout() to receive() to try 
> something and forgot to change it back.
> 
> Jeez, I hate myself.
> 
> Thanks.
> 
> 
> So how can I now hide the core.thread.thread_joinAll so the library user 
> doesn't have to type it themselves in main() ? I don't see how that can 
> be done.
> 

I assume you need something more than thread_joinAll, because you need 
to stop all the threads from executing also.

So wrapping this up into a single call would be what you use (it's OK to 
ask the user to clean up a library manually).

-Steve


More information about the Digitalmars-d-learn mailing list