Last active
November 14, 2025 20:57
-
-
Save gnodet/f93643630f296c5db37faed20b83fe85 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| max = current() + 100s | |
| while (max - current() > 0) | |
| lock.tryLock(shared, max - current()) | |
| if not present locally | |
| lock.unlock(shared) | |
| if lock.tryLock(exclusive, 1s) | |
| if not present locally | |
| download | |
| lock.unlock(exclusive) | |
| break | |
| else | |
| break | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment