/[svn]/linuxsampler/trunk/src/engines/InstrumentManagerThread.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/InstrumentManagerThread.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3765 by schoenebeck, Fri Jun 23 12:24:58 2017 UTC revision 3766 by schoenebeck, Mon Apr 6 12:41:49 2020 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2005 - 2017 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2020 Christian Schoenebeck                       *
4   *                                                                         *   *                                                                         *
5   *   This library is free software; you can redistribute it and/or modify  *   *   This library is free software; you can redistribute it and/or modify  *
6   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 98  namespace LinuxSampler { Line 98  namespace LinuxSampler {
98    
99      // Entry point for the task thread.      // Entry point for the task thread.
100      int InstrumentManagerThread::Main() {      int InstrumentManagerThread::Main() {
101            #if DEBUG
102            Thread::setNameOfCaller("InstrumentMngr");
103            #endif
104    
105          while (true) {          while (true) {
106    
             #if CONFIG_PTHREAD_TESTCANCEL  
107              TestCancel();              TestCancel();
108              #endif  
109                // prevent thread from being cancelled
110                // (e.g. to prevent deadlocks while holding mutex lock(s))
111                pushCancelable(false);
112    
113              while (true) {              while (true) {
114                  command_t cmd;                  command_t cmd;
# Line 146  namespace LinuxSampler { Line 152  namespace LinuxSampler {
152                  }                  }
153              }              }
154    
155                // now allow thread being cancelled again
156                // (since all mutexes are now unlocked)
157                popCancelable();
158    
159              // nothing left to do, sleep until new jobs arrive              // nothing left to do, sleep until new jobs arrive
160              conditionJobsLeft.WaitIf(false);              conditionJobsLeft.WaitIf(false);
161              // reset flag              // reset flag

Legend:
Removed from v.3765  
changed lines
  Added in v.3766

  ViewVC Help
Powered by ViewVC