swiftlang / swiftlang/swift-corelibs-libdispatch
`DispatchQoS` and `DispatchSpecificKey` should have consistent `Sendable` conformances between macOS and linux
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.6k
- Forks
- 496
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
this issue originally filed at https://github.com/swiftlang/swift/issues/76773
Description
the DispatchQoS and DispatchSpecificKey are conditionally Sendable on macOS, but not on linux for some reason, which creates a needless portability barrier for developers that aim to support both platforms.
Reproduction
import Dispatch
func f()
{
let x:DispatchQoS = { fatalError() }()
Task.init
{
let y:DispatchQoS = x
let _ = y
}
Task.init
{
let y:DispatchQoS = x
let _ = y
}
}
Expected behavior
the types should have consistent conformances across platforms
Environment
$ swiftc --version
Swift version 6.0.1 (swift-6.0.1-RELEASE)
Target: x86_64-unknown-linux-gnu
Additional information
the original context was attempting to build GRDB.swift on linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the DispatchQoS and DispatchSpecificKey declarations exposed by the Dispatch module and compare their Sendable conformances on macOS and Linux. Reproduce the issue with the provided swiftc example targeting x86_64-unknown-linux-gnu; done means both types have matching cross-platform conformances and the example compiles consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100