Thomas Weidenmueller wrote:
Created the named pipes with the FILE_FLAG_OVERLAPPED flag, otherwise the call to ConnectNamedPipe() will block the server thread if no connection can be established, which causes the rpc server to dead-lock during startup.
Hi Thomas,
I have a patch that converts rpcrt4 over to using overlapped I/O, but I didn't submit it because the performance on Wine is horrible. When using overlapped I/O we have to perform several more server calls than when using non-overlapped I/O. Also, I think that this patch is incorrect because if you want to make the pipe overlapped then you have to fix up all of the ReadFile calls to take an OVERLAPPED structure.
I'll shortly be starting a rewrite of part of the RPC server so that we can support more transports and I'll bear this bug in mind when I do it and I'll try to fix it. The solution I come to will probably involve a worker thread doing the ConnectNamedPipe.