-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed race condition in the state reducers. Also fixed missing reducer (
#208) Fix the race condition introduced here #206 Also added detailed explanation on the job scheduling algorithm Fixed the race condition let's say we have [G1, G2, G3] in getStateQueue and [S1, S2, S3] in setStateQueue. we want to purge all [S1, S2, S3] before taking any task in getStateQueue. With the original implementation, the execution order will be S1 -> G1 -> S2 -> G2 -> S3 -> G3, which has the race condition. With this change, the execution order will be S1 -> S2 -> S3 -> G1 -> G2 -> G3 Also fix a missing reducer. Let's say we have [G1] and [S1, S2, S3], in the original implementation, execution order will be S1 -> G1 -> S2 (S3 is missing). with this PR update, execution order will be S1 -> S2 -> S3 -> G1
- Loading branch information
1 parent
60afc38
commit 08eb673
Showing
1 changed file
with
76 additions
and
6 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