summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/export_status.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour/export_status.h')
-rw-r--r--libs/ardour/ardour/export_status.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/libs/ardour/ardour/export_status.h b/libs/ardour/ardour/export_status.h
index 6c6396dc5f..95921629c7 100644
--- a/libs/ardour/ardour/export_status.h
+++ b/libs/ardour/ardour/export_status.h
@@ -39,17 +39,22 @@ class LIBARDOUR_API ExportStatus {
/* Status info */
volatile bool stop;
- volatile bool running;
void abort (bool error_occurred = false);
bool aborted () const { return _aborted; }
bool errors () const { return _errors; }
+ bool running () const { return _running; }
+
+ void set_running (bool r) {
+ assert (!_run_lock.trylock()); // must hold lock
+ _running = r;
+ }
+ Glib::Threads::Mutex& lock () { return _run_lock; }
PBD::Signal0<void> Finished;
void finish ();
- bool finished () const { return _finished; }
- void cleanup ();
+ void cleanup ();
/* Progress info */
@@ -77,8 +82,9 @@ class LIBARDOUR_API ExportStatus {
private:
volatile bool _aborted;
volatile bool _errors;
- volatile bool _finished;
+ volatile bool _running;
+ Glib::Threads::Mutex _run_lock;
};
} // namespace ARDOUR