Skip to content

Prevent deadlock when dispatching snapshot notifications (#794) - #797

Open
shayann07 wants to merge 1 commit into
cashapp:trunkfrom
shayann07:fix/while-active-notifier-deadlock
Open

shayann07 wants to merge 1 commit into
cashapp:trunkfrom
shayann07:fix/while-active-notifier-deadlock

Conversation

@shayann07

Copy link
Copy Markdown
Contributor

Dispatching snapshot notifications synchronously inside a state write callback could cause a lock inversion deadlock when running on an immediate dispatcher.

Dispatch snapshot change notifications asynchronously to avoid holding global state locks during notification handling. Added unit tests reproducing concurrent writes under immediate dispatch.

Fixes #794

This branch has not been deployed

No deployments
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.

WhileActive notifier can deadlock: launch in the global write observer runs inline under Main.immediate

1 participant