If your writer writes the location and then sets the event, your reader will
either wake up and then do the read AFTER the write occurs, or will have
already woken up for some other reason, do the read BEFORE the write occurs,
but then when your reader does a wait on your event, it will still be set,
and consequently your reader will wake up and do the read AFTER the write.
You do not need an interlocked operation here, nor would it help.
-----Original Message-----
From: rajinder sharma [mailto:xxxxx@hotmail.com]
Sent: Friday, May 18, 2001 1:24 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Re[2]: terminating a system thread
But what about if the read (in thread_A) and write (in thread_B) are
occuring at the same time on this variable?
If you use it as a ‘one way street’, that means the thread that reads
it will never write to it and other threads that write to it will never
read it than you need no protection !
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com