mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-08 22:55:44 +01:00
use exception-safe inc/dec in TransportFSM::process_events()
Note: the processing guard variable is required because this code could be re-entrant
This commit is contained in:
parent
20997dfa78
commit
590b4165e8
1 changed files with 2 additions and 3 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include "pbd/error.h"
|
||||
#include "pbd/pthread_utils.h"
|
||||
#include "pbd/stacktrace.h"
|
||||
#include "pbd/unwind.h"
|
||||
|
||||
#include "ardour/debug.h"
|
||||
#include "ardour/disk_reader.h"
|
||||
|
|
@ -113,7 +114,7 @@ TransportFSM::hard_stop ()
|
|||
void
|
||||
TransportFSM::process_events ()
|
||||
{
|
||||
processing++;
|
||||
ExceptionSafeIncDec<int> esid (processing);
|
||||
|
||||
while (!queued_events.empty()) {
|
||||
|
||||
|
|
@ -172,8 +173,6 @@ TransportFSM::process_events ()
|
|||
delete ev;
|
||||
}
|
||||
}
|
||||
|
||||
processing--;
|
||||
}
|
||||
|
||||
/* This is the transition table from the original boost::msm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue