
On Wed, Nov 25, 2009 at 12:59 AM, Gottlob Frege <gottlobfrege@gmail.com> wrote:
I've checked in a new version on trunk
https://svn.boost.org/svn/boost/trunk/boost/thread/win32/once.hpp
Probably, except you never actually wait on the event! :-) (or maybe I missed it).
I'm assuming you mean to wait on it after the 'waiting' thread creates it if it doesn't exist:
if(!counted) { BOOST_INTERLOCKED_INCREMENT(&flag.count); counted=true; status=::boost::detail::interlocked_read_acquire(&flag.status); if(status==function_complete_flag_value) { break; }
event_handle=::boost::detail::interlocked_read_acquire(&flag.event_handle); if(!event_handle) {
event_handle=::boost::detail::allocate_event_handle(flag.event_handle); continue; } ***** Wait(event_handle); ****** ? }
Or not quite there, because of the 'continue', but somewhere around there. (?)