> On Wed, Mar 10, 2010 at 12:29 PM, Michael Widenius <mo...@askmonty.org> wrote:
>> We also use the thr_alarm() functionality when one uses 'kill
>> connection-id' in MySQL.  I don't know of any easy way to gracefully
>> wake up a thread that is sleeping on SO_SNDTIMEO. Do you?

Well, I checked the code, and it seems to wake up the thread using
pthread_kill(thread, signal) for the 'kill connection-id' command. This should
work fine also when using SO_SNDTIMEO for timeouts on the socket.

Just send the signal to the thread blocking on the socket with SO_SNDTIMEO,
and the blocking socket call will return with EAGAIN or similar.

 - Kristian.

_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to     : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to