Conversation
|
Thanks! |
Collaborator
Author
|
I wish we could support Julia v1.11+, then we'd be able to use |
Add a simple compatibility shim for Julia v1.10 which doesn't have `Base.Lockable`.
Collaborator
Author
|
Ok, it turns out defining |
We don't need to refer to the lock specifically, we can simplify refer to the lockable object. This also means we don't need to keep the lock objects around.
maleadt
reviewed
May 4, 2026
Collaborator
There was a problem hiding this comment.
I'm not sure this actually fixes the issue. For update_status, what about taking a snapshot of the relevant dicts at the start of the function?
function update_status()
running_snapshot = Base.@lock test_lock copy(running_tests)
isempty(running_snapshot) && return
results_snapshot = Base.@lock results_lock copy(results)
completed = length(results_snapshot)
total = length(tests)
# continue using snapshots
end
Lockable is still useful to protect wrkr.io.
See #133
* Fix update_status race by snapshotting under the lock instead. * Drop unnecessary Lockable wrapping of `tests` It's read-only anyway.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #131.