mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-26 15:32:04 +00:00
Ensured a copy is passed for writing back rather than the original.
This commit is contained in:
parent
63ff5165a4
commit
81a3cbac45
@ -23,8 +23,9 @@ void Disk::set_track_at_position(unsigned int head, unsigned int position, const
|
||||
cached_tracks_[address] = track;
|
||||
|
||||
if(!update_queue_) update_queue_.reset(new Concurrency::AsyncTaskQueue);
|
||||
update_queue_->enqueue([this, head, position, track] {
|
||||
store_updated_track_at_position(head, position, track, file_access_mutex_);
|
||||
std::shared_ptr<Track> track_copy(track->clone());
|
||||
update_queue_->enqueue([this, head, position, track_copy] {
|
||||
store_updated_track_at_position(head, position, track_copy, file_access_mutex_);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user