Send never returns

Jonathan M Davis jmdavisProg at gmx.com
Thu Sep 30 18:42:56 PDT 2010


On Thursday 30 September 2010 14:21:24 Bob Cowdery wrote:
> Is this a bug?
> 
> I've tracked down this particular issue. It seems that if a thread (B)
> is spawned from another thread (A) then A can message B but if B tries
> to message A it never returns. However, B and C can communicate Ok. I
> did have three threads, A spawning B &C. I now have just B &C with a
> receive loop in the main thread which appears to work. Everyone can
> message everyone else.
> 
> I can't do this app without threads and I really want to use message
> passing concurrency. If it's really unreliable that's going to be a
> stopper.
> 
> bob

I really don't know what exactly works and what doesn't with std.concurrency. 
You'll have to mess around with it to see if you can get it to do what you want, 
but I've given up on it for the time being. Some people are definitely using it 
in code, but I don't know what they're doing with it and why it works (or seems 
to work) when whatever I've tried to use it for has run into problems like the 
bug I mentioned before.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list