Re: Interrupting a socket waiting on nlAcceptConnection() or nlRead()?


[ Follow Ups ] [ Post Followup ] [ Back To Message Board ]

Posted by Phil Frisbie, Jr. on February 17, 2006 at 14:54:07:

In Reply to: Re: Interrupting a socket waiting on nlAcceptConnection() or nlRead()? posted by vince on February 13, 2006 at 04:33:56:

: I think I have the same problem like the OP. I would like to shutdown(2) the connection, to unblock a worker thread, that's currently nlRead()ing. To close the socket is not a solution, because it introduces race conditions (see below). I think, optimal would be to provide a function nlTerminate(soket) that calls shutdown(2) on the socket handle; then, all blocking functions would unblock. Or is there a better solution that I've overlooked?

I am fixing nlClose() to elimnate the deadlock.

Phil



Follow Ups:


Post a Followup

Name:
E-Mail:

Subject:

Comments:



[ Follow Ups ] [ Post Followup ] [ Back To Message Board ]