Send never returns

Jonathan M Davis jmdavisProg at gmx.com
Thu Sep 30 12:58:19 PDT 2010


On Thursday 30 September 2010 12:13:02 Bob Cowdery wrote:
>  Hi
> 
> I'm just starting to debug some code and have run into a problem.  There
> is a bit too much code to post so as a first shot I wondered if anyone
> has had this happen.
> 
> I have a thread in a read loop reading from a USB device. When it
> accumulates enough data it dispatches it to another thread. The read
> loop is working fine and I can see the accumulated data but when I call
> tid.send() it never returns. There are no errors. I have not put in
> exception handling yet and wondered about the default behavior when
> exceptions are not caught. Are they just passed up and spat out on the
> console? I know it's a long shot but does anyone have any ideas.
> 
> bob

There are various bugs with std.concurrency at the moment that make it so that 
it doesn't always work. For instance, I reported this bug on std.concurrency: 
http://d.puremagic.com/issues/show_bug.cgi?id=4601 It relates to threads not 
terminating and/or other threads not running after another thread has run. There  
are, I believe, other similar bugs which have been reported, though I'd have to 
go searching to see what they are.

Personally, I find std.concurrency totally unusable at the moment. It rarely 
works for me, and I just don't trust it. I really _want_ to use it, but it's 
just too buggy right now.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list