TDPL message passing: OwnerFailed?

2013-01-22 Thread monarch_dodra
I was trying to do a simple program to test message passing. Basically, I have 1 owner, and 2 slave threads. I'm facing two problems: 1 ) First, I want the slaves to be informed of when the master dies in an abnormal way. TDPL suggest OwnerFailed, but apparently, the out of band exception

Re: TDPL message passing: OwnerFailed?

2013-01-22 Thread Martin Drasar
On 22.1.2013 11:08, monarch_dodra wrote: I was trying to do a simple program to test message passing. Basically, I have 1 owner, and 2 slave threads. I'm facing two problems: 1 ) First, I want the slaves to be informed of when the master dies in an abnormal way. TDPL suggest

Re: TDPL message passing: OwnerFailed?

2013-01-22 Thread Ali Çehreli
On 01/22/2013 04:26 AM, Martin Drasar wrote: On 22.1.2013 11:08, monarch_dodra wrote: I was trying to do a simple program to test message passing. wouldn't this help you? http://dlang.org/phobos/std_concurrency.html#.spawnLinked The following chapter may be helpful as well:

Re: TDPL message passing: OwnerFailed?

2013-01-22 Thread monarch_dodra
On Tuesday, 22 January 2013 at 12:27:12 UTC, Martin Drasar wrote: Hi, wouldn't this help you? http://dlang.org/phobos/std_concurrency.html#.spawnLinked According to documentation: Executes the supplied function in a new context represented by Tid. This new context is linked to the calling

Re: TDPL message passing: OwnerFailed?

2013-01-22 Thread Ali Çehreli
On 01/22/2013 09:04 AM, monarch_dodra wrote: I'm getting some errors with this program: I can not reproduce this problem on Linux. Not with -m64 nor with -m32. I don't think the following is necessary but it has been a workaround for me in the past: import core.thread; void main(string[]