
16 Feb
2011
16 Feb
'11
9 p.m.
I’ve got some boost code that calls wait for single object on windows.
I’d like to transition this to use boost.thread.
What is the best way of doing this, in the while loop I’m doing:
while( WaitForSingleObject( hDir, WAIT_TIMEOUT ) != WAIT_OBJECT_0 )
What's this object? If it's Windows event, you can re-write your code to use condition_variable and wait on it. If it's a thread handle, you wait by using join() member function of te appropriate thread object.