-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
downloader: manual .lock remove may lead to race and creation of data…
… files without .torrent (#9782) ``` if !prohibited(file) && !exists(file) { create(file) } ``` such pattern is always race - even if `prohibited`/`exists()`/`create()` are atomic inside. to eliminate race - need move towards analog of `CompareAndSwap` - `CreateIfNotProhibited` which in 1 mutex lock will: check_lock, existence, create.
- Loading branch information
1 parent
a5d82cf
commit c756a55
Showing
4 changed files
with
55 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters