OwnerTerminated graceful handling
sybrandy
sybrandy at gmail.com
Thu Oct 7 15:25:32 PDT 2010
On 10/06/2010 07:48 PM, Eitan Frachtenberg wrote:
> N00b question: Based on the TPDL, explicitly receive()ing OwnerTerminated prevents an exception from throwing when the owner thread terminates. Yet this is exactly what happens in the following code:
>
> import std.concurrency;
>
> void thr() {
> receive(
> (OwnerTerminated) { return; }
> );
> }
>
> void main() {
> spawn(&thr);
> }
>
> Try to wrap the receive with a try/catch pair only causes a segfault, but that's not the point anyway. What am I missing something here?
>
> Thanks,
> --Eitan.
>
I've seen the same issue. From what I've seen, std.concurrency is still
a work in progress, so hopefully the bugs will get worked out soon.
Casey
More information about the Digitalmars-d
mailing list