mirror of
https://github.com/boostorg/thread.git
synced 2026-01-23 18:12:12 +00:00
thread move constructor is not explicit, so self() compiles for MSVC8 and Intel; thread_exit_callback_node constructor added to remove warnings on MSVC8; thread destructor no longer calls cancel
[SVN r40456]
This commit is contained in:
@@ -150,7 +150,7 @@ namespace boost
|
||||
public:
|
||||
thread();
|
||||
~thread();
|
||||
|
||||
|
||||
template <class F>
|
||||
explicit thread(F f):
|
||||
thread_info(new thread_data<F>(f))
|
||||
@@ -158,7 +158,7 @@ namespace boost
|
||||
start_thread();
|
||||
}
|
||||
template <class F>
|
||||
explicit thread(boost::move_t<F> f):
|
||||
thread(boost::move_t<F> f):
|
||||
thread_info(new thread_data<F>(f))
|
||||
{
|
||||
start_thread();
|
||||
@@ -193,8 +193,6 @@ namespace boost
|
||||
cancel_handle get_cancel_handle() const;
|
||||
void cancel();
|
||||
bool cancellation_requested() const;
|
||||
|
||||
static thread self();
|
||||
};
|
||||
|
||||
namespace this_thread
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace boost
|
||||
start_thread();
|
||||
}
|
||||
|
||||
explicit thread(boost::move_t<thread> x);
|
||||
thread(boost::move_t<thread> x);
|
||||
thread& operator=(boost::move_t<thread> x);
|
||||
operator boost::move_t<thread>();
|
||||
boost::move_t<thread> move();
|
||||
|
||||
@@ -162,7 +162,6 @@ namespace boost
|
||||
|
||||
thread::~thread()
|
||||
{
|
||||
cancel();
|
||||
detach();
|
||||
}
|
||||
|
||||
@@ -381,6 +380,11 @@ namespace boost
|
||||
{
|
||||
boost::detail::thread_exit_function_base* func;
|
||||
thread_exit_callback_node* next;
|
||||
|
||||
thread_exit_callback_node(boost::detail::thread_exit_function_base* func_,
|
||||
thread_exit_callback_node* next_):
|
||||
func(func_),next(next_)
|
||||
{}
|
||||
};
|
||||
}
|
||||
namespace
|
||||
@@ -434,9 +438,9 @@ namespace boost
|
||||
{
|
||||
void add_thread_exit_function(thread_exit_function_base* func)
|
||||
{
|
||||
thread_exit_callback_node* const new_node=heap_new<thread_exit_callback_node>();
|
||||
new_node->func=func;
|
||||
new_node->next=get_current_thread_data()->thread_exit_callbacks;
|
||||
thread_exit_callback_node* const new_node=
|
||||
heap_new<thread_exit_callback_node>(func,
|
||||
get_current_thread_data()->thread_exit_callbacks);
|
||||
get_current_thread_data()->thread_exit_callbacks=new_node;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user