Sending a socket to another thread

Andrew Wiley debio264 at gmail.com
Tue Feb 15 11:37:05 PST 2011


On Tue, Feb 15, 2011 at 12:00 PM, lurker <lurker at mailinator.com> wrote:
> I'd like to modify the listener sample to handle requests in separate
> threads but I'm experiencing weird crashes.

What platform and version of DMD? There was a bug in the Socket
implementation on Windows recently where the WinSock data was either
initialized or deinitialized multiple times. I don't remember the
details, but I remember having "weird crashes."
>
> Once a connection is established can I send() the relevant socket to
> another thread and receive() from there?

Yes, I've done this in the past.


More information about the Digitalmars-d-learn mailing list