Skip to content

perf: remove need to lock for pending_refusal for every recv call - #969

Merged
seanmonstar merged 1 commit into
masterfrom
sean/kkyqyyqqvsnn
Oct 5, 2026
Merged

seanmonstar merged 1 commit into
masterfrom
sean/kkyqyyqqvsnn

Conversation

@seanmonstar

Copy link
Copy Markdown
Member

Previously, every receive loop would lock and check for a pending refusal, release the lock, and then lock again to do actual receive call.

Now, the refusal is noticed if it happens during a receive check, it's stored outside the loop, and the lock only need to be taken again if something is refused.

I don't have perf measurements, but it's a small change for halving the lock calls.

@seanmonstar
seanmonstar merged commit 5b17a0e into master Oct 5, 2026
8 checks passed
@seanmonstar
seanmonstar deleted the sean/kkyqyyqqvsnn branch October 5, 2026 22:49
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