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
@ -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…
Reference in New Issue
Block a user