Concurrency

Graham St Jack Graham.StJack at internode.on.net
Sun Jul 25 15:57:45 PDT 2010


I have been using std.concurrency for a while, and have been very 
impressed by it. In particular, it was easy to get a complex 
multi-threaded application going with std.concurrency. The 
thread-local-storage behaviour of D is really cool too.

However, I have had some problems with std.concurrency (most of which 
I'm sure are already being addressed by Sean). In particular, I wanted a 
way to select on multiple file-descriptors so that I could (say) send 
commands to a thread that also reads from a blocking file-descriptor 
like a serial port, UDP socket or GTK main loop. I also wanted to 
experiment with the amazing template capabilities of D that I found out 
about in the book, and see if I could generate boiler-plate 
message-passing code that doesn't rely on "magic" like Variant.

The attached file is where I am at so far. It works, but still needs a 
lot of work to bring it up to scratch. The reason for posting it here is 
to stimulate some discussion about how D's standard concurrency module 
should behave (and maybe get a few helpful tips).

Please take a look and let me know what you think.

-- 
Graham St Jack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: concurrency.d
Type: text/x-dsrc
Size: 14839 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100726/65908f32/attachment-0001.d>


More information about the Digitalmars-d mailing list