-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Replace async Mutex for
RaftInner.core_state
with standar…
…d Mutex and a watch channel In this commit, when joining the `RaftCore` task, the `core_state` is first switched from `Running` to `Joining`. The thread then blocks while awaiting the completion of the `RaftCore` task. Any other threads observing the `Joining` state will wait for the first thread to finish by monitoring a `watch` channel created by the initial thread.
- Loading branch information
1 parent
69ab424
commit 5c82dfd
Showing
3 changed files
with
62 additions
and
16 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