-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
Fix stop
button for sync
#6312
Merged
Merged
Fix stop
button for sync
#6312
Conversation
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
ahuang11
commented
Feb 6, 2024
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #6312 +/- ##
==========================================
+ Coverage 71.64% 71.67% +0.02%
==========================================
Files 305 305
Lines 45559 45602 +43
==========================================
+ Hits 32642 32683 +41
- Misses 12917 12919 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
philippjfr
approved these changes
Feb 8, 2024
philippjfr
reviewed
Feb 15, 2024
philippjfr
reviewed
Feb 15, 2024
philippjfr
reviewed
Feb 15, 2024
JupyterLite test execution is failing the UI tests, which is unrelated. Will merge. |
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.
As Philipp mentioned #6295 (comment), "Generators really do not seem useful here, a generator function is blocking, therefore even if this did work you'd just get the final output and never see the intermediate outputs."
After, I realized the stop button didn't quite work for sync functions. For some reason, at some point in time, I thought
loop.run_in_executor
would prevent it from blocking the placeholder / stop clicks, like https://stackoverflow.com/questions/41063331/how-to-use-asyncio-with-existing-blocking-library, but I couldn't get it to work.This PR hides the stop button if it's a sync function and immediately shows the placeholder.
Screen.Recording.2024-02-05.at.10.34.56.PM.mov