Skip to content

Serialize calls to Dns.Callback#9561

Merged
swankjesse merged 1 commit into
masterfrom
jwilson.0718.serialize
Jul 19, 2026
Merged

Serialize calls to Dns.Callback#9561
swankjesse merged 1 commit into
masterfrom
jwilson.0718.serialize

Conversation

@swankjesse

Copy link
Copy Markdown
Collaborator

We had a bug where these calls could be made in parallel. Making them serial is a bit awkward but doesn't require any locks if we're clever.

We had a bug where these calls could be made in parallel. Making
them serial is a bit awkward but doesn't require any locks if we're
clever.
)
}

private tailrec fun updateStateAndCallCallbacks(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I am curious if it's materially faster than simple synchronisation?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not! But I prefer lock-free 'cause it only covers data, not execution.

@swankjesse
swankjesse merged commit 6268afe into master Jul 19, 2026
45 of 47 checks passed
@swankjesse
swankjesse deleted the jwilson.0718.serialize branch July 19, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants