Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-03-22 10:35:56


Vladimir Prus wrote:
> Kevin Wheatley wrote:
>
>> On Windows I'm getting the:
>>
>> res = WaitForSingleObject(reinterpret_cast<HANDLE>(m_thread),
>> INFINITE);
>> assert(res == WAIT_OBJECT_0);
>> res = CloseHandle(reinterpret_cast<HANDLE>(m_thread));
>> assert(res);
>>
>> res == WAIT_OBJECT_0 assert failing, but I have no idea why because
>> I'm not told it failed due to the void thread::join().
>
> I don't yet know if thread::join should return something or throw an
> exception, but reporting the error in a better way is desirable. On
> Linux, assert can be replaced with "perror/abort" combination, and on
> windows something like that should be also possible
> ("FormatMessage"?).
>
> Anybody objects if I make the change for Linux?

Yes. assert is not equivalent to perror/abort. The two have different
meanings and are not interchangeable.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net