13
0

Vapor: thread-safe export abort

Prevent concurrent processing while running finalize_export.
This commit is contained in:
Robin Gareus 2024-05-22 19:44:17 +02:00
parent 13814deba2
commit f227839247
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -125,6 +125,7 @@ ExportHandler::ExportHandler (Session & session)
ExportHandler::~ExportHandler ()
{
if (export_status->aborted () && !current_timespan->vapor ().empty () && session.surround_master ()) {
Glib::Threads::Mutex::Lock l (export_status->lock());
session.surround_master ()->surround_return ()->finalize_export ();
}
graph_builder->cleanup (export_status->aborted () );