anon pipe w/multiple write handles

anon pipe w/multiple write handles

Post by Mark Meyer » Sat, 12 May 2001 05:44:25



process A and B each has a write handle to anonymous pipe 1.
process C sits and waits for messages on anonymous pipe 1's read handle.

If A and B simultaneoulsy conduct a single WriteFile() to pipe 1, is there a
possibility of the bytes in the two writes to become interleaved?
Thx in advance.
-Mark

 
 
 

anon pipe w/multiple write handles

Post by Felix Kasza [MVP » Sat, 12 May 2001 22:38:34


Mark,

 > If A and B simultaneoulsy conduct a single WriteFile()
 > to pipe 1, is there a possibility of the bytes in the
 > two writes to become interleaved?

No. NT guarantees the atomicity of WriteFile().

--

Cheers,
Felix.

If you post a reply, kindly refrain from emailing it, too.
Please consider migrating to microsoft.public.platformsdk.*
where the MS folks plan on* around. See you there!

 
 
 

anon pipe w/multiple write handles

Post by Mark Meyer » Mon, 14 May 2001 23:47:27




Quote:> Mark,

>  > If A and B simultaneoulsy conduct a single WriteFile()
>  > to pipe 1, is there a possibility of the bytes in the
>  > two writes to become interleaved?

> No. NT guarantees the atomicity of WriteFile().

Any idea what the guarantee is with 98/Me ?
 
 
 

anon pipe w/multiple write handles

Post by Felix Kasza [MVP » Tue, 15 May 2001 03:07:01


Mark,

 > Any idea what the guarantee is with 98/Me ?

No, but my educated guess is that the same rule applies, at least for
file handles. Always assuming that 9x doesn't crash on the spot if it
has more than one I/O in the queue.

--

Cheers,
Felix.

If you post a reply, kindly refrain from emailing it, too.
Please consider migrating to microsoft.public.platformsdk.*
where the MS folks plan on* around. See you there!