Waiting on file descriptor/socket *AND* thread messages

ichneumwn idonotenjoyemail at idonotenjoyemail.org
Mon Jun 29 09:14:52 UTC 2020


Dear all,

Is there some facility in D for a single statement/function call 
that will wait on both file descriptors, like Socket.select(), 
and will also wake up when there is something to be receive()'d?

One solution would be to have my main thread use receive() and a 
helper thread that does the select() call and sends a message to 
the main thread. That seems a bit of overkill however.

Apologies if this has been asked before, but my google search and 
search in this thread were fruitless (could be my searching 
skills)

Cheers



More information about the Digitalmars-d-learn mailing list