swiftlang / swiftlang/swift-corelibs-libdispatch
class DispatchSerialQueue not available under Linux
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.6k
- Forks
- 496
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
Probably another inconsistency, but the following code creating an actor backed by serial DispatchQueue works on macOS and does not compile under Linux:
public actor MyActor {
let queue = DispatchSerialQueue(label: "actorQueue")
nonisolated public var unownedExecutor: UnownedSerialExecutor {
queue.asUnownedSerialExecutor()
}
}
Under Linux it produces the following error:
/src/Sources/Test/test.swift:63:17: error: cannot find 'DispatchSerialQueue' in scope
61 | public actor MyActor {
62 | let logger: Logger
63 | let queue = DispatchSerialQueue(label: "relayQueue")
| `- error: cannot find 'DispatchSerialQueue' in scope
64 |
65 | nonisolated public var unownedExecutor: UnownedSerialExecutor {
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 by reproducing the provided actor and DispatchSerialQueue snippet on Linux, then compare its availability with macOS. The issue is resolved when the example compiles under Linux with the expected serial-executor behavior; no source file or test is named in the report.
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
- 35/100