1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-23 15:41:09 +02:00

Exception safety in: ondemand

This commit is contained in:
Paul Licameli 2017-03-15 23:02:00 -04:00
parent 195732f074
commit 664974d3ff

View File

@ -348,10 +348,9 @@ bool ODPCMAliasBlockFile::IsSummaryAvailable() const
///Calls write summary, and makes sure it is only done once in a thread-safe fashion. ///Calls write summary, and makes sure it is only done once in a thread-safe fashion.
void ODPCMAliasBlockFile::DoWriteSummary() void ODPCMAliasBlockFile::DoWriteSummary()
{ {
mWriteSummaryMutex.Lock(); ODLocker locker { &mWriteSummaryMutex };
if(!IsSummaryAvailable()) if(!IsSummaryAvailable())
WriteSummary(); WriteSummary();
mWriteSummaryMutex.Unlock();
} }
///sets the file name the summary info will be saved in. threadsafe. ///sets the file name the summary info will be saved in. threadsafe.