Hi Dan,
I don't know if this is what you want to hear, but I'm rewriting the named pipe code to handle message mode and solve the problem you pointed out, so if you wait a while, I'll have lots of new code for you... though it's probably a good idea to fix the current code first so we have a something that works before I break it again.
To make a thread go to sleep, you pass in an event flag in your request, then wait on the event flag in the client after the server call returns.
Mike
Dan Kegel wrote:
Mike McCormack wrote:
Hmmm. I didn't think of that case when I wrote the code :(
It seems that we need to add code to create a pipe and wait for a server (ps_wait_connect) in server/named_pipe.c, line 349, and some more to connect a new pipe server to waiting clients at line 380.
If somebody wants to do it feel free, otherwise I'll turn out a patch sooner or later...
Hrm. I'm trying to understand how the calling thread gets put to sleep on, say, a call to WaitNamedPipe. Can I buy a vowel?
- Dan