summaryrefslogtreecommitdiff
path: root/src/lib/cross.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-05 00:04:21 +0100
committerCarl Hetherington <cth@carlh.net>2019-11-05 00:04:21 +0100
commitc9cadc1e53abb60a485a8a6de3eeecd54892b4d7 (patch)
tree1fee4436ac266c41efb6c6c7f92b4e9c74ec888e /src/lib/cross.cc
parent09c0b4dc1566f11f35ec05be415be1b95bd9976c (diff)
Yet more waking (in hash computation).
Diffstat (limited to 'src/lib/cross.cc')
-rw-r--r--src/lib/cross.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/cross.cc b/src/lib/cross.cc
index 1b83bad7c..dcd4ddfd8 100644
--- a/src/lib/cross.cc
+++ b/src/lib/cross.cc
@@ -337,6 +337,7 @@ void
Waker::nudge ()
{
#ifdef DCPOMATIC_WINDOWS
+ boost::mutex::scoped_lock lm (_mutex);
SetThreadExecutionState (ES_SYSTEM_REQUIRED);
#endif
}
@@ -344,6 +345,7 @@ Waker::nudge ()
Waker::Waker ()
{
#ifdef DCPOMATIC_OSX
+ boost::mutex::scoped_lock lm (_mutex);
/* We should use this */
// IOPMAssertionCreateWithName (kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, CFSTR ("Encoding DCP"), &_assertion_id);
/* but it's not available on 10.5, so we use this */
@@ -354,6 +356,7 @@ Waker::Waker ()
Waker::~Waker ()
{
#ifdef DCPOMATIC_OSX
+ boost::mutex::scoped_lock lm (_mutex);
IOPMAssertionRelease (_assertion_id);
#endif
}