mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-06 11:42:17 +01:00
Access BlockFile::mFileName without copying, with proper multithreading cautions
This commit is contained in:
@@ -369,13 +369,9 @@ void ODDecodeBlockFile::SetFileName(wxFileNameWrapper &&name)
|
||||
}
|
||||
|
||||
///sets the file name the summary info will be saved in. threadsafe.
|
||||
wxFileName ODDecodeBlockFile::GetFileName() const
|
||||
auto ODDecodeBlockFile::GetFileName() const -> GetFileNameResult
|
||||
{
|
||||
wxFileName name;
|
||||
mFileNameMutex.Lock();
|
||||
name = mFileName;
|
||||
mFileNameMutex.Unlock();
|
||||
return name;
|
||||
return { mFileName, ODLocker{ &mFileNameMutex } };
|
||||
}
|
||||
|
||||
/// A thread-safe version of CalcSummary. BlockFile::CalcSummary
|
||||
|
||||
Reference in New Issue
Block a user