fixes stop condition on sync emulator#1
Merged
petergjoel merged 2 commits intoDEIS-Tools:mainfrom Sep 15, 2021
Merged
Conversation
petergjoel
requested changes
Sep 15, 2021
| if self._terminated >= len(self._devices): | ||
| if all([self._done[x] or not self._threads[x].is_alive() | ||
| for x in self.ids()]): | ||
| if self._round_lock.locked(): |
Member
There was a problem hiding this comment.
@anton-christensen is there some indentation that has gone wrong here?
Collaborator
Author
There was a problem hiding this comment.
Small stylistic choice, but its a short line so i've moved it onto the same line.
emulators/SyncEmulator.py
Outdated
| def terminated(self, index:int): | ||
| self._progress.acquire() | ||
| self._done[index] = True | ||
| self._terminated += 1 |
Member
There was a problem hiding this comment.
I think this _terminated variable should die now, the _done array implements the same functionality (but in a more robust way)
Collaborator
Author
There was a problem hiding this comment.
Yup, it's removed in the new commit
9d36045 to
4a17bb3
Compare
petergjoel
approved these changes
Sep 15, 2021
michelealbano
pushed a commit
that referenced
this pull request
Oct 14, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.