summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-08-02 20:41:55 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-08-02 21:03:09 (GMT)
commitd5ace22054203c7989691ae8b3fa4e4784d1b57e (patch)
tree64d400cdb10644967df183d0f202fcbf8160a773 /3rdParty/Boost/src/boost/asio/detail/impl/win_thread.ipp
parent6f26d9aa86f0909af13b23b1a925b8d492e74154 (diff)
downloadswift-contrib-ks/boost1.47.zip
swift-contrib-ks/boost1.47.tar.bz2
Add two extra Boost dependencies, upgrade to 1.47.0ks/boost1.47
Diffstat (limited to '3rdParty/Boost/src/boost/asio/detail/impl/win_thread.ipp')
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/impl/win_thread.ipp13
1 files changed, 7 insertions, 6 deletions
diff --git a/3rdParty/Boost/src/boost/asio/detail/impl/win_thread.ipp b/3rdParty/Boost/src/boost/asio/detail/impl/win_thread.ipp
index 07cc5c2..c9a3fa7 100644
--- a/3rdParty/Boost/src/boost/asio/detail/impl/win_thread.ipp
+++ b/3rdParty/Boost/src/boost/asio/detail/impl/win_thread.ipp
@@ -102,12 +102,12 @@ void win_thread::start_thread(func_base* arg, unsigned int stack_size)
unsigned int __stdcall win_thread_function(void* arg)
{
- std::auto_ptr<win_thread::func_base> func(
- static_cast<win_thread::func_base*>(arg));
+ win_thread::auto_func_base_ptr func = {
+ static_cast<win_thread::func_base*>(arg) };
- ::SetEvent(func->entry_event_);
+ ::SetEvent(func.ptr->entry_event_);
- func->run();
+ func.ptr->run();
// Signal that the thread has finished its work, but rather than returning go
// to sleep to put the thread into a well known state. If the thread is being
@@ -115,8 +115,9 @@ unsigned int __stdcall win_thread_function(void* arg)
// TerminateThread (to avoid a deadlock in DllMain). Otherwise, the SleepEx
// call will be interrupted using QueueUserAPC and the thread will shut down
// cleanly.
- HANDLE exit_event = func->exit_event_;
- func.reset();
+ HANDLE exit_event = func.ptr->exit_event_;
+ delete func.ptr;
+ func.ptr = 0;
::SetEvent(exit_event);
::SleepEx(INFINITE, TRUE);