Skip to content

Commit

Permalink
Reorder assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
rmrfslashhome committed Dec 24, 2024
1 parent 4c5bf82 commit 452c9d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sync/Context.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ Context: [{

wait: [
done? ~ [
[data.waitedBy nil? ] "multiple attempts to wait on the same fiber" assert
[data.fiber currentFiber is ~] "attempted to wait on itself" assert
[data.waitedBy nil? ] "multiple attempts to wait on the same fiber" assert

@currentFiber @data.!waitedBy
canceled? [
Expand Down
2 changes: 1 addition & 1 deletion sync/ContextGroup.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ ContextGroup: [{
] when

[fibers.empty? ~] [
[fibers.first.waitedBy nil? ] "multiple attempts to wait on the same fiber" assert
[fibers.first.fiber currentFiber is ~] "attempted to wait on itself" assert
[fibers.first.waitedBy nil? ] "multiple attempts to wait on the same fiber" assert

@currentFiber @fibers.@first.!waitedBy
canceled? ~ [
Expand Down

0 comments on commit 452c9d0

Please sign in to comment.