www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Feature request: Shared receive for all waitable objects

reply "Phil Deets" <pjdeets2 gmail.com> writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4365

It would be nice to be able to wait for either socket data or a  
cross-thread message. I've filed a bug with the request. I'm just posting  
here in case anyone wants to vote on the bug or in case this post will  
spur discussion which will cause the feature to be added sooner.

Thanks,
Phil Deets
Jun 22 2010
parent Sean Kelly <sean invisibleduck.org> writes:
"Phil Deets" <pjdeets2 gmail.com> wrote:
 http://d.puremagic.com/issues/show_bug.cgi?id=4365
 
 It would be nice to be able to wait for either socket data or a 
 cross-thread message. I've filed a bug with the request. I'm just
 posting  here in case anyone wants to vote on the bug or in case this
 post will  spur discussion which will cause the feature to be added
 sooner.

I'd like it too. But first I think the socket API in Phobos needs an overhaul. Also, waiting on both is really just a matter of having the socket thread bundle incoming data into messages and sending it to whoever, so that bit is pretty easy even for the user to do.
Jun 22 2010