projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert mac rdisk vs disk stuff as I'm not convinced it makes much difference.
[dcpomatic.git]
/
src
/
lib
/
checker.cc
diff --git
a/src/lib/checker.cc
b/src/lib/checker.cc
index 2d15dd3f1e1adae3fed945674cfff9676498d3ba..c32462b42b57c8bd9c4da0e448e950adb8e6f4ed 100644
(file)
--- a/
src/lib/checker.cc
+++ b/
src/lib/checker.cc
@@
-28,8
+28,7
@@
using boost::bind;
using boost::ref;
Checker::Checker (int period)
using boost::ref;
Checker::Checker (int period)
- : _thread (0)
- , _terminate (false)
+ : _terminate (false)
, _ok (true)
, _period (period)
{
, _ok (true)
, _period (period)
{
@@
-39,7
+38,7
@@
Checker::Checker (int period)
void
Checker::run ()
{
void
Checker::run ()
{
- _thread =
new boost::thread (boost::bind
(&Checker::thread, this));
+ _thread =
boost::thread (boost::bind
(&Checker::thread, this));
}
Checker::~Checker ()
}
Checker::~Checker ()
@@
-49,20
+48,14
@@
Checker::~Checker ()
_terminate = true;
}
_terminate = true;
}
- if (_thread) {
- /* Ideally this would be a DCPOMATIC_ASSERT(_thread->joinable()) but we
- can't throw exceptions from a destructor.
- */
- _thread->interrupt ();
+ if (_thread.joinable()) {
+ _thread.interrupt ();
try {
try {
- if (_thread->joinable ()) {
- _thread->join ();
- }
- } catch (boost::thread_interrupted& e) {
- /* No problem */
+ _thread.join ();
+ } catch (...) {
+
}
}
}
}
- delete _thread;
}
void
}
void