mirror of
https://github.com/boostorg/thread.git
synced 2026-02-09 11:32:12 +00:00
Updated in line with RC 1.34
[SVN r39693]
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// Copyright (C) 2001-2003
|
||||
// William E. Kempf
|
||||
// Copyright (C) 2007 Anthony Williams
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -89,18 +90,6 @@ public:
|
||||
bool m_started;
|
||||
};
|
||||
|
||||
#if defined(BOOST_HAS_WINTHREADS)
|
||||
|
||||
struct on_thread_exit_guard
|
||||
{
|
||||
~on_thread_exit_guard()
|
||||
{
|
||||
on_thread_exit();
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // unnamed namespace
|
||||
|
||||
extern "C" {
|
||||
@@ -112,25 +101,13 @@ extern "C" {
|
||||
static OSStatus thread_proxy(void* param)
|
||||
#endif
|
||||
{
|
||||
// try
|
||||
{
|
||||
thread_param* p = static_cast<thread_param*>(param);
|
||||
boost::function0<void> threadfunc = p->m_threadfunc;
|
||||
p->started();
|
||||
threadfunc();
|
||||
#if defined(BOOST_HAS_WINTHREADS)
|
||||
|
||||
on_thread_exit_guard guard;
|
||||
|
||||
on_thread_exit();
|
||||
#endif
|
||||
|
||||
thread_param* p = static_cast<thread_param*>(param);
|
||||
boost::function0<void> threadfunc = p->m_threadfunc;
|
||||
p->started();
|
||||
threadfunc();
|
||||
}
|
||||
// catch (...)
|
||||
// {
|
||||
//#if defined(BOOST_HAS_WINTHREADS)
|
||||
// on_thread_exit();
|
||||
//#endif
|
||||
// }
|
||||
#if defined(BOOST_HAS_MPTASKS)
|
||||
::boost::detail::thread_cleanup();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user