mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-31 08:58:43 +01:00
Unitary thread review (#623)
* Fix uninitialized members of ProjectFileIO... ... which fixes this problem I observed: Opening a previously saved project, saving-as to another path, then exiting Audacity, gives a progress dialog waiting for checkpoints to end, which doesn't go away * Remove two mutexes... ... One wasn't used at all, and another was only ever used by one thread, and then not correctly unlocked for each locking on all possible paths. * Values that the worker thread writes and main reads should be atomic * Remember to close db connections even after failure to open
This commit is contained in:
@@ -229,11 +229,9 @@ private:
|
||||
std::thread mCheckpointThread;
|
||||
std::condition_variable mCheckpointCondition;
|
||||
std::mutex mCheckpointMutex;
|
||||
std::mutex mCheckpointActive;
|
||||
std::mutex mCheckpointClose;
|
||||
std::atomic_bool mCheckpointStop;
|
||||
uint64_t mCheckpointWaitingPages;
|
||||
uint64_t mCheckpointCurrentPages;
|
||||
std::atomic_bool mCheckpointStop{ false };
|
||||
std::atomic< std::uint64_t > mCheckpointWaitingPages{ 0 };
|
||||
std::atomic< std::uint64_t > mCheckpointCurrentPages{ 0 };
|
||||
|
||||
friend SqliteSampleBlock;
|
||||
friend AutoCommitTransaction;
|
||||
|
||||
Reference in New Issue
Block a user