summaryrefslogtreecommitdiff
path: root/libs/pbd/crossthread.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-04-04 12:21:26 +0000
committerCarl Hetherington <carl@carlh.net>2011-04-04 12:21:26 +0000
commit02cfe41bff57712e59f7169037d694a3dd6a1420 (patch)
tree02d58170bfc5567caff21b8a6b08e66cd9f790dc /libs/pbd/crossthread.cc
parentb850f5846799ce416b3203a4ee585f5d925ef066 (diff)
Update region peak amplitude when the region is trimmed (#3931).
git-svn-id: svn://localhost/ardour2/branches/3.0@9276 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/crossthread.cc')
-rw-r--r--libs/pbd/crossthread.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/libs/pbd/crossthread.cc b/libs/pbd/crossthread.cc
index 12ca19b945..553c8d52f3 100644
--- a/libs/pbd/crossthread.cc
+++ b/libs/pbd/crossthread.cc
@@ -30,7 +30,7 @@ using namespace std;
using namespace PBD;
using namespace Glib;
-CrossThreadChannel::CrossThreadChannel ()
+CrossThreadChannel::CrossThreadChannel (bool non_blocking)
{
_ios = 0;
fds[0] = -1;
@@ -41,14 +41,16 @@ CrossThreadChannel::CrossThreadChannel ()
return;
}
- if (fcntl (fds[0], F_SETFL, O_NONBLOCK)) {
- error << "cannot set non-blocking mode for x-thread pipe (read) (" << ::strerror (errno) << ')' << endmsg;
- return;
- }
-
- if (fcntl (fds[1], F_SETFL, O_NONBLOCK)) {
- error << "cannot set non-blocking mode for x-thread pipe (write) (%2)" << ::strerror (errno) << ')' << endmsg;
- return;
+ if (non_blocking) {
+ if (fcntl (fds[0], F_SETFL, O_NONBLOCK)) {
+ error << "cannot set non-blocking mode for x-thread pipe (read) (" << ::strerror (errno) << ')' << endmsg;
+ return;
+ }
+
+ if (fcntl (fds[1], F_SETFL, O_NONBLOCK)) {
+ error << "cannot set non-blocking mode for x-thread pipe (write) (%2)" << ::strerror (errno) << ')' << endmsg;
+ return;
+ }
}
}