Skip to content

Conversation

@hawkadrian
Copy link

What

Release RLock() before the blocking select in deliver(). Copy postC to a local variable under the lock, then release it before channel operations. Add recover() to handle the race where the channel may be closed between copying and using it.

Why

Prevents closewait() from blocking when waiting for Lock() while deliver() holds RLock() during channel operations. This improves responsiveness when closing subscriptions under high concurrency.

@hawkadrian hawkadrian requested a review from fjl as a code owner December 18, 2025 12:50
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.

1 participant