[rpcrt4] Properly created named pipes

Thomas Weidenmueller wine-patches at reactsoft.com
Tue Jan 17 03:58:02 CST 2006

Robert Shearman wrote:
> 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.

That's true, the ReadFile calls would also have to use the OVERLAPPED
structure, but that would only work if the pipes were created with the
PIPE_NOWAIT flag. Otherwise ReadFile and WriteFile will (or better
should) be still synchronous regardless of the FILE_FLAG_OVERLAPPED flag.

> 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.

I hope the code gets fixed before the next wine release, because rpcrt4
currently deadlocks (or should deadlock) when starting a server (at
least in ROS/Win).

P.S. With WINE 0.9.5's implementation I noticed a massive thread leak on
server-side (one thread per request?), is this a known bug?

- Thomas

More information about the wine-devel mailing list