Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make progress stop when block stops #204

Merged
merged 1 commit into from
Oct 4, 2022
Merged

make progress stop when block stops #204

merged 1 commit into from
Oct 4, 2022

Conversation

grosser
Copy link
Owner

@grosser grosser commented Oct 4, 2022

replaces #203

@zdrve

@zdrve
Copy link
Collaborator

zdrve commented Oct 4, 2022

It's not as watertight as my PR, but it'll help most of the time, I'll give you that.

Edit: mine has the same bug. It's fixable in mine; not sure it is in yours.

@grosser
Copy link
Owner Author

grosser commented Oct 4, 2022

I'm not aware of any edge-case or bug that is not addressed, can you elaborate ?

@zdrve
Copy link
Collaborator

zdrve commented Oct 4, 2022

         break if stop
                         # <- the other thread calls 'thread.run' here
          Kennel.err.print animation[count % animation.size]
                         # <- or here
          sleep interval

in which case the .run won't wake up the thread, because it hasn't slept yet.

@grosser
Copy link
Owner Author

grosser commented Oct 4, 2022

yeah true, good catch :)
0.0x% chance that we lose 0.2s so should be fine :)

@grosser grosser merged commit dbb7f9d into master Oct 4, 2022
@grosser grosser deleted the grosser/pass branch October 4, 2022 18:24
@grosser
Copy link
Owner Author

grosser commented Oct 4, 2022

found 1 more race condition that could crash the progress #205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants