468,306 Members | 1,188 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,306 developers. It's quick & easy.

Events vs. Condition Variables

What's all the hullabuloo dissing events in favor of condition variables?
Is it just certain uses of events (Win32 events that is) that is seen as bad
practice? And can't they be used just like condition variables anyway?
Anyone have a link to a discussion of such? And is this question OK in
here or better in a general programming group?

Tony
Nov 21 '06 #1
2 3160
Tony wrote:
What's all the hullabuloo dissing events in favor of condition
variables? Is it just certain uses of events (Win32 events that is)
that is seen as bad practice? And can't they be used just like
condition variables anyway? Anyone have a link to a discussion of
such? And is this question OK in here or better in a general programming
group?
Since you seem to be talking about thread synchronization objects,
try comp.programming.threads.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Nov 21 '06 #2
Tony wrote:
What's all the hullabuloo dissing events in favor of condition variables?
Is it just certain uses of events (Win32 events that is) that is seen as bad
practice? And can't they be used just like condition variables anyway?
Anyone have a link to a discussion of such? And is this question OK in
here or better in a general programming group?
The basic problem is events aren't sharable by more than one waiting
thread. Only one thread can reset the event. This makes it impossible
for other waiting threads to properly coordinate without a race condition.
Followup set to comp.programming.threads.

--
Joe Seigh

When you get lemons, you make lemonade.
When you get hardware, you make software.
Nov 22 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Markus Ernst | last post: by
4 posts views Thread by Bardo | last post: by
2 posts views Thread by P. Gorecki | last post: by
3 posts views Thread by Yohan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.