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

Unlock Document and dispatch events if we have lock #857

Merged
merged 3 commits into from Dec 10, 2019
Merged

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Dec 8, 2019

This PR ensures that when even on the server events are dispatched immediately. This is achieved by adding an unlock context manager which dispatches all ModelChangedEvents triggered in the context body to all sockets on current sessions. I have to do significantly more testing to figure out if this is actually safe.

Fixes #778

@philippjfr philippjfr added the type: enhancement label Dec 8, 2019
@codecov
Copy link

@codecov codecov bot commented Dec 8, 2019

Codecov Report

Merging #857 into master will decrease coverage by 0.17%.
The diff coverage is 22.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #857      +/-   ##
==========================================
- Coverage   69.94%   69.76%   -0.18%     
==========================================
  Files         104      104              
  Lines       10463    10499      +36     
==========================================
+ Hits         7318     7325       +7     
- Misses       3145     3174      +29
Impacted Files Coverage Δ
panel/widgets/base.py 36.06% <0%> (-0.61%) ⬇️
panel/io/__init__.py 0% <0%> (ø) ⬆️
panel/io/server.py 17.27% <12.5%> (-1.96%) ⬇️
panel/pane/holoviews.py 75.25% <66.66%> (+0.06%) ⬆️
panel/viewable.py 56.28% <66.66%> (+0.13%) ⬆️
panel/pane/base.py 59.47% <66.66%> (+0.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0fdc326...1bf976c. Read the comment docs.

@philippjfr
Copy link
Member Author

@philippjfr philippjfr commented Dec 10, 2019

Going to merge and make sure I test it extensively before release.

@philippjfr philippjfr merged commit 17b5db5 into master Dec 10, 2019
2 of 4 checks passed
@philippjfr philippjfr deleted the unlocked_events branch Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant