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:
Paul Davis 2022-06-13 10:52:31 -06:00
parent 20997dfa78
commit 590b4165e8
1 changed files with 2 additions and 3 deletions

View File

@ -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