What is a good way to shutdown Threads blocked on NamedPipeServer#WaitForConnection?

This is cheesy, but it is the only method I have gotten to work. Create a ‘fake’ client and connect to your named pipe to move past the WaitForConnection. Works every time.

Also, even Thread.Abort() did not fix this issue for me.

_pipeserver = null;

using (NamedPipeClientStream npcs = new NamedPipeClientStream("pipename")) 

Leave a Comment