|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67137 - in branches/release/libs/signals2: . test
From: fmhess_at_[hidden]
Date: 2010-12-09 13:32:06
Author: fmhess
Date: 2010-12-09 13:32:06 EST (Thu, 09 Dec 2010)
New Revision: 67137
URL: http://svn.boost.org/trac/boost/changeset/67137
Log:
Merged from trunk to release.
Properties modified:
branches/release/libs/signals2/ (props changed)
Text files modified:
branches/release/libs/signals2/test/connection_test.cpp | 2 +-
branches/release/libs/signals2/test/mutex_test.cpp | 32 ++++++++++++++++----------------
2 files changed, 17 insertions(+), 17 deletions(-)
Modified: branches/release/libs/signals2/test/connection_test.cpp
==============================================================================
--- branches/release/libs/signals2/test/connection_test.cpp (original)
+++ branches/release/libs/signals2/test/connection_test.cpp 2010-12-09 13:32:06 EST (Thu, 09 Dec 2010)
@@ -76,7 +76,7 @@
conn.disconnect();
// earlier release shouldn't affect new connection
- bs2::connection conn2 = sig.connect(&myslot);
+ conn2 = sig.connect(&myslot);
scoped = conn2;
}
BOOST_CHECK(conn2.connected() == false);
Modified: branches/release/libs/signals2/test/mutex_test.cpp
==============================================================================
--- branches/release/libs/signals2/test/mutex_test.cpp (original)
+++ branches/release/libs/signals2/test/mutex_test.cpp 2010-12-09 13:32:06 EST (Thu, 09 Dec 2010)
@@ -32,10 +32,10 @@
enum wait_type { use_sleep_only, use_mutex, use_condition };
execution_monitor(wait_type type, int secs)
- : done(false), type(type), secs(secs) { }
+ : done(false), m_type(type), m_secs(secs) { }
void start()
{
- if (type != use_sleep_only) {
+ if (m_type != use_sleep_only) {
boost::mutex::scoped_lock lock(mutex); done = false;
} else {
done = false;
@@ -43,10 +43,10 @@
}
void finish()
{
- if (type != use_sleep_only) {
+ if (m_type != use_sleep_only) {
boost::mutex::scoped_lock lock(mutex);
done = true;
- if (type == use_condition)
+ if (m_type == use_condition)
cond.notify_one();
} else {
done = true;
@@ -54,12 +54,12 @@
}
bool wait()
{
- boost::posix_time::time_duration timeout = boost::posix_time::seconds(secs);
- if (type != use_condition)
+ boost::posix_time::time_duration timeout = boost::posix_time::seconds(m_secs);
+ if (m_type != use_condition)
boost::this_thread::sleep(timeout);
- if (type != use_sleep_only) {
+ if (m_type != use_sleep_only) {
boost::mutex::scoped_lock lock(mutex);
- while (type == use_condition && !done) {
+ while (m_type == use_condition && !done) {
if (!cond.timed_wait(lock, timeout))
break;
}
@@ -72,8 +72,8 @@
boost::mutex mutex;
boost::condition cond;
bool done;
- wait_type type;
- int secs;
+ wait_type m_type;
+ int m_secs;
};
template <typename F>
@@ -81,25 +81,25 @@
{
public:
indirect_adapter(F func, execution_monitor& monitor)
- : func(func), monitor(monitor) { }
+ : m_func(func), m_monitor(monitor) { }
void operator()() const
{
try
{
- boost::thread thrd(func);
+ boost::thread thrd(m_func);
thrd.join();
}
catch (...)
{
- monitor.finish();
+ m_monitor.finish();
throw;
}
- monitor.finish();
+ m_monitor.finish();
}
private:
- F func;
- execution_monitor& monitor;
+ F m_func;
+ execution_monitor& m_monitor;
void operator=(indirect_adapter&);
};
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