On 01/10/2010 02:42, Jonathan M Davis wrote: > 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 There is definitely something not right with the error handling. Certain errors will stop a thread dead with no exception thrown. I've just been debugging one such thread and found I was calculating a very large out of bounds offset for an array. When I fixed that I had another mistake where the source and destination slice was not equal. In this case it threw an exception.
bob