Вышел релиз boost 1.53.
BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED should not be enabled by default
Наконец-то.
Здравствуйте, Nikita.Trophimov, Вы писали:
NT>NT>BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED should not be enabled by default
NT>Наконец-то.
так нафиг это нужно? если сильно хочется, можно и отрубить, но по дефаулту лучше с ним.
Здравствуйте, Nikita.Trophimov, Вы писали:
NT>Вышел релиз boost 1.53.
Atomic, Lockfree, Coroutine — вкуснятина!
S>так нафиг это нужно? если сильно хочется, можно и отрубить, но по дефаулту лучше с ним.
Он прописывается в скрипте для сборки. Следовательно, пришлось бы поставлять отдельную сборку boost'а для каждого, кто занимается этим проектом.
Более того, теперь, в связи с тем, что на одну версию они включили это имя по дефолту, всё время придётся писать в коде проверки вроде
if (th.joinable()) // for boost 1.52
{
th.join();
}
Здравствуйте, Nikita.Trophimov, Вы писали:
NT>NT>BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED should not be enabled by default
NT>Наконец-то.
а это не расходится со стандартным поведением, описанным здесь:
http://en.cppreference.com/w/cpp/thread/thread/join ?
Здравствуйте, uzhas, Вы писали:
U>а это не расходится со стандартным поведением, описанным здесь: http://en.cppreference.com/w/cpp/thread/thread/join ?
А там, вообще-то, не по стандарту описано...
30.3.1.5-7
Throws: system_error when an exception is required (30.2.2).
30.2.2
1
Some functions described in this Clause are specified to throw exceptions of type system_error (19.5.6).
Such exceptions shall be thrown if any of the function’s error conditions is detected or a call to an operating
system or other underlying API results in an error that prevents the library function from meeting its
specifications. Failure to allocate storage shall be reported as described in 17.6.5.12.
[Example: Consider a function in this clause that is specified to throw exceptions of type system_error
and specifies error conditions that include operation_not_permitted for a thread that does not have the
privilege to perform the operation. Assume that, during the execution of this function, an errno of EPERM is
reported by a POSIX API call used by the implementation. Since POSIX specifies an errno of EPERM when
“the caller does not have the privilege to perform the operation”, the implementation maps EPERM to an
error_condition of operation_not_permitted (19.5) and an exception of type system_error is thrown.
—end example ]
2
The error_code reported by such an exception’s code() member function shall compare equal to one of
the conditions specified in the function’s error condition element.
Переубедить Вас, к сожалению, мне не удастся, поэтому сразу перейду к оскорблениям.
Забыл
30.3.1.5-8
Error conditions:
— resource_deadlock_would_occur — if deadlock is detected or this->get_id() == std::this_-
thread::get_id().
— no_such_process — if the thread is not valid.
— invalid_argument — if the thread is not joinable.
Переубедить Вас, к сожалению, мне не удастся, поэтому сразу перейду к оскорблениям.
Здравствуйте, Evgeny.Panasyuk, Вы писали:
NT>>Вышел релиз boost 1.53.
EP>Atomic, Lockfree, Coroutine - вкуснятина!
Hell yeah! Немедленно в продакшен!