On 06/01/2018 04:12 AM, Russel Winder wrote:
Obviously std.concurrency.receive should never terminate a thread, and
it should never terminate a thread silently, but given that it clearly
does (using dmd 2.080 from d-apt on Debian Sid) how is one to find out
useful information as to why it is exiting silently.
It sounds like one of the message handlers is throwing. In that case, it
sounds like a good idea to wrap each handler with try-catch.
Ali
P.S. In case it's useful for someone, and I know it's not for the same
case, I include something about exceptions in a worker thread, which
shows that it's possible to receive a shared(Exception):
http://ddili.org/ders/d.en/concurrency.html#ix_concurrency.exception,%20concurrency
However, it fails to suggest catching Throwable or Error at least for
debugging.