On 6/29/20 4:34 PM, aberba wrote:

> So with this, without the Thread.sleep() to block main from exiting, the
> spawned thread  will terminate immediately.

You can call core.thread.thread_joinAll at the end of main.

Another way would be to wait for a worker's exit by looking for LinkTerminated but you need to start the thread with spawnLinked:

  http://ddili.org/ders/d.en/concurrency.html#ix_concurrency.LinkTerminated

Ali

Reply via email to