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

Synchronously create Document patch message to avoid race conditions #6028

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

philippjfr
Copy link
Member

In order to support immediate dispatch of events when a Document lock is not required we have a special handler that sends messages on the websocket when Bokeh would ordinarily wait to acquire a lock explicitly. When a document lock is required, however, this custom handling can result in race conditions because the event isn't dispatched until long after the model has been added as a reference to the Document, meaning that when the message is created and dispatched it assumes the model has already been fully serialized. In order to work around this we immediately serialize events into messages ensuring that they correctly reflect the state of the document at the time the event is generated.

Fixes #6019

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.

pn.state.onload results in "Uncaught Error: reference pXXXX isn't known" starting in Panel1.0 / Bokeh 3.0
1 participant