-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update GDKStoneSpec>>checkSystemIsVoting: for 3.7.0
- Loading branch information
1 parent
3157d29
commit e1ce369
Showing
1 changed file
with
12 additions
and
4 deletions.
There are no files selected for viewing
16 changes: 12 additions & 4 deletions
16
src/GsDevKit_stones-Core.package/GDKStoneSpec.class/instance/checkSystemIsVoting..st
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
backup/restore | ||
checkSystemIsVoting: isVotingBlock | ||
| vs sessId | | ||
| vs | | ||
vs := System voteState. | ||
sessId := System sessionIdHoldingGcLock. | ||
(sessId ~~ 0 or: [ vs > 0 and: [ vs < 4 ] ]) | ||
ifTrue: [ isVotingBlock value: sessId value: vs ] | ||
(System respondsTo: #'sessionsHoldingGcLock') | ||
ifTrue: [ | ||
| sessIds | | ||
sessIds := System sessionsHoldingGcLock. | ||
(sessIds size > 0 or: [ vs > 0 and: [ vs < 4 ] ]) | ||
ifTrue: [ isVotingBlock value: sessIds value: vs ] ] | ||
ifFalse: [ | ||
| sessId | | ||
sessId := System sessionIdHoldingGcLock. | ||
(sessId ~~ 0 or: [ vs > 0 and: [ vs < 4 ] ]) | ||
ifTrue: [ isVotingBlock value: sessId value: vs ] ] |