-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(atomic_mutex): Add synchronous
try_lock
method
Add a method on `AtomicMutex` that can return an error if the lock is already held. We only want *one* instance to `triton_vm::prove` to run at a time, but for some cases, it's OK to not produce the proof right now, in case another task is running the prover. So we plan to add a field to `GlobalStateLock` which is a Mutex that indicates if the prover is already running or not. For this, we want both the option of waiting until the prover is free and of checking if it's free and otherwise aborting.
- Loading branch information
1 parent
7fc160b
commit bd66d85
Showing
2 changed files
with
78 additions
and
0 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