-
Notifications
You must be signed in to change notification settings - Fork 947
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
Change Promises to Async/Await #3584
base: main
Are you sure you want to change the base?
Conversation
This is a replacement to #2779 |
…change to manager-base.create_view
I wonder what this means for performance (having skimmed over https://v8.dev/blog/fast-async ). |
Having some trouble figuring out what to do about the failing checks. Particularly I can't replicate the The build error is happening in a method I refactored out of _handle_comm_msg. It's nearly a copy and paste of the original promise callback function. Any advice is welcome. |
@jmk89 This is due to the change in the |
@jmk89 Here is a commit I added last week to fix the issue of not compiling: ibdafna@c4f468e |
As an update, we discussed this in the ipywidgets dev meeting, and a few of us will have more time to look at this next week during the widgets dev workshop. Thanks! |
@jmk89 I am happy to push the fix above, directly to this branch, with your permission! 🙏 |
@ibdafna sounds good to me, thanks for asking 😄 . Although I'm not fully understanding the fix 😅 - it seems to me like setting the state_change to the awaited state_change breaks the "chain of state change" which was being queued. It's quite likely that I'm misunderstanding, if there's any enlightenment you can forward my way I'd appreciate it 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely convinced we should be changing the signature of public methods from sync to async and not awaiting on them.
We could inadvertently be introducing a lot of race conditions because previously we didn't await on promises and now we're awaiting on them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DonJayamanne thanks for taking the time to look through my PR and leave feedback. I was initially painting with some broad strokes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated some methods from @DonJayamanne feedback.
Some were simple and some were not