I have a managed thread that waits, is blocked, in unmanaged code (in particular, it is called NamedPipeServerStream.WaitForConnection (), which ultimately calls the unmanaged code and does not offer a timeout).
I want to gently close the stream.
Thread.Abort () does not work until the code returns to a managed area, which will not be executed until the client makes a connection that we cannot wait).
I need a way to “shock” him from unmanaged code; or a way to just kill a thread, even when it is in unmanaged land.
James curran
source share