apple / apple/swift-async-dns-resolver

Reconsider the used method of thread-safety once updating to c-ares 1.23.0+

Open
#58 0 comments 0 reactions 0 assignees View on GitHub
area/performance kind/enhancement platform/linux
Dominant language
Swift
Stars
160
Forks
33
PR merge metrics
No merged PRs in 30d

Description

c-ares added opt-out thread-safety (simple locks around all channel-related functions) in 1.23.0: https://github.com/c-ares/c-ares/pull/636

We're still using an older version, but once we update, we should either leave the c-ares provided lock in, and remove our outer lock in AresChannel.swift, or the opposite: disable c-ares locking, and keep ours. We want to avoid paying the cost for both.

Contributor guide

Open the contributing guide

Research direction

Start with AresChannel.swift and review c-ares 1.23.0's opt-out thread-safety change in PR 636. Compare retaining c-ares locking with removing the outer lock, or disabling c-ares locking while retaining the outer lock; done means selecting one mechanism and avoiding the cost of both.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
networking
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.