Boost logo

Boost :

From: Sean Kelly (sean_at_[hidden])
Date: 2004-01-27 20:47:15

On Mon, 26 Jan 2004, Hurd, Matthew wrote:
> So are you saying that multiple threads calling WaitForSingleObject for
> the same event is not safe or is the lack of safety elsewhere in the
> windows event mechanism. I wouldn't mind a source url or something for
> this if you have one so I can come up to speed.

Aside from the papers linked to in the Boost.Thread documentation, the
best thing to do is search comp.programming.threads for "windows" and
"event." The discussion has come up there quite a few times, including
some of the original talk about the Boost.Thread implementation.
Alexander Terekhov (from this list) is involved in most of the discussions
so you could search on his name as well.

One such link is here:

By the way, I'm not saying that WaitForMultipleObjects is broken so much
as that Windows events seem to be broken once you get beyond the fairly
simple cases. Waiting on a mutex in Windows uses the WaitForObject calls
as well, so I don't think the function itself is at issue.

> I think WSFU if a crimson herring, best to forget about it.

I don't think I'd ever want to require a customer to install WSFU to use
my application, but from the documentation it seems quite solid. Rather
than Win32 wrappers (ala Cygwin) it's actually an entire subsystem that
contains a full posix implementation. I haven't done much more than skim
the docs, but it's at least worth some play-time.

As for the rest... I like to come to my own conclusions and an still
reading up on the details in my rather limited free time. I will freely
admit that I would be more likely to use the Boost condvar implementation
everywhere rather than in just the complcated cases if I could safely do
away with a large chunk of the code. I guess what I want is for someone
to prove to me that the solution really does need to be as complex as it
seems :)


Boost list run by bdawes at, gregod at, cpdaniel at, john at