Debugging silent exit of threads in Phobos calls

Russel Winder russel at winder.org.uk
Fri Jun 1 15:09:37 UTC 2018


On Fri, 2018-06-01 at 07:59 -0700, Ali Çehreli via Digitalmars-d-learn
wrote:
> 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.

The try/catch allows one to see that there appears to be a problem
inside Phobos, i.e. it determines that x.X is not the same type as x.X
and throws an assertion error. To handle this in the application is to
accept that Phobos is broken and not fixable. :-(

Unless this is actually just that x.X is not x.X even though it is x.X.
In this case it would be a module naming error in D and Phobos is not
wrong. 

> […]
-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20180601/be83b856/attachment.sig>


More information about the Digitalmars-d-learn mailing list