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

Fix race conditions when initializing and rendering IPyWidgets #5462

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Aug 31, 2023

When rendering IPyWidgets in a notebook there was a race condition which meant that because lazy_initialize was slow you could end up with multiple Views for the same model.

@mattpap While I realize I was inappropriately using lazy_initialize here I think this revealed a bokeh bug where there could be a race condition where this._child_views was reset while a view was still initializing meaning that it was never cleaned up (or reused).

Fixes #5459

@philippjfr philippjfr force-pushed the ipywidget_render_fix branch from b9e58cf to e541c3f Compare August 31, 2023 15:57
@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

Merging #5462 (e541c3f) into main (26e4163) will decrease coverage by 46.41%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main    #5462       +/-   ##
===========================================
- Coverage   70.07%   23.67%   -46.41%     
===========================================
  Files         274      274               
  Lines       40089    40089               
===========================================
- Hits        28094     9490    -18604     
- Misses      11995    30599    +18604     
Flag Coverage Δ
unitexamples-tests 23.67% <ø> (-46.41%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 171 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@philippjfr philippjfr merged commit 7f86f4b into main Aug 31, 2023
@philippjfr philippjfr deleted the ipywidget_render_fix branch August 31, 2023 16:16
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.

Duplication bug while trying to render native ipywidgets
2 participants