|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86552 - branches/release/boost/thread
From: vicente.botet_at_[hidden]
Date: 2013-11-03 15:43:42
Author: viboes
Date: 2013-11-03 15:43:42 EST (Sun, 03 Nov 2013)
New Revision: 86552
URL: http://svn.boost.org/trac/boost/changeset/86552
Log:
Thread: merge [86540] to fix #9319.
Text files modified:
branches/release/boost/thread/future.hpp | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)
Modified: branches/release/boost/thread/future.hpp
==============================================================================
--- branches/release/boost/thread/future.hpp Sun Nov 3 14:20:09 2013 (r86551)
+++ branches/release/boost/thread/future.hpp 2013-11-03 15:43:42 EST (Sun, 03 Nov 2013) (r86552)
@@ -959,7 +959,11 @@
virtual void execute(boost::unique_lock<boost::mutex>& lck) {
try
{
- this->mark_finished_with_result_internal(func_(), lck);
+ Fp local_fuct=boost::move(func_);
+ relocker relock(lck);
+ Rp res = local_fuct();
+ relock.lock();
+ this->mark_finished_with_result_internal(boost::move(res), lck);
}
catch (...)
{
@@ -1008,7 +1012,10 @@
virtual void execute(boost::unique_lock<boost::mutex>& lck) {
try
{
- func_();
+ Fp local_fuct=boost::move(func_);
+ relocker relock(lck);
+ local_fuct();
+ relock.lock();
this->mark_finished_with_result_internal(lck);
}
catch (...)
@@ -3848,7 +3855,12 @@
virtual void execute(boost::unique_lock<boost::mutex>& lck) {
try
{
- this->mark_finished_with_result_internal(continuation(boost::move(parent)), lck);
+ Fp local_fuct=boost::move(continuation);
+ F ftmp = boost::move(parent);
+ relocker relock(lck);
+ Rp res = local_fuct(boost::move(ftmp));
+ relock.lock();
+ this->mark_finished_with_result_internal(boost::move(res), lck);
}
catch (...)
{
@@ -3880,7 +3892,11 @@
virtual void execute(boost::unique_lock<boost::mutex>& lck) {
try
{
- continuation(boost::move(parent));
+ Fp local_fuct=boost::move(continuation);
+ F ftmp = boost::move(parent);
+ relocker relock(lck);
+ local_fuct(boost::move(ftmp));
+ relock.lock();
this->mark_finished_with_result_internal(lck);
}
catch (...)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk