With Socket:Dispose from using Thread.Abort to less agressive alternative.
commit956dba9d5c8b1c523313e0081f1029ae88c4c812
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 27 Jun 2012 20:36:54 +0000 (27 17:36 -0300)
committerRodrigo Kumpera <kumpera@gmail.com>
Wed, 27 Jun 2012 22:59:56 +0000 (27 19:59 -0300)
tree9dd307d0653a68ec89cc4c3215fc076594e56a85
parent10f00c2e322ce66d567818488913f55ad0c241a7
With Socket:Dispose from using Thread.Abort to less agressive alternative.

* Socket_2_1.cs: When closing a socket we need to abort any
pending syscalls to that socket. For most syscalls the kernel
does it for us. But accept/connect on linux requires extra
love.

We previously used Thread.Abort to implement that, but this
is a pretty radical solution with very complicated ramifications.
So instead now we use a new icall cancel_blocking_socket_operation
that makes sure we only abort the syscall and do nothing else.

This reduces the trouble surface a lot given how tricky
Thread.Abort is.
mcs/class/System/System.Net.Sockets/Socket.cs
mcs/class/System/System.Net.Sockets/Socket_2_1.cs