[Mono-dev] [PATCH] Interrupting socket calls on Windows during shutdown.
vargaz at gmail.com
Mon Jun 22 11:47:53 EDT 2009
Hi, looks mostly ok, just:
- there is no need for locking the thread in socket-io.c, interrupt_on_stop
is only set for the current thread.
On Mon, Jun 22, 2009 at 4:49 PM, Bill Holmes <billholmes54 at gmail.com> wrote:
> We have run into another problem on Windows with socket calls on
> background threads not stopping during shutdown. The attached patch
> sets a flag on the thread struct around the socket calls. If this
> flag is set when thread manage is called that thread will be killed
> during the APC call.
> This only applies to threads that are stopping (process shutdown) and
> are background threads.
> 2009-06-22 Bill Holmes <billholmes54 at gmail.com>
> * object-internals.h : Adding interrupt_on_stop field.
> * threads.c (mono_thread_request_interruption) : On Windows exit the
> thread if interrupt_on_stop is set.
> * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal)
> Removing old interrupt logic and setting the interrupt_on_stop for
> thread when calling accept.
> * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal)
> setting the interrupt_on_stop for the thread when calling accept.
> * Thread.cs : Adding interrupt_on_stop field.
> Contributed under MIT/X11 license.
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list