Skip to content

class DispatchSerialQueue not available under Linux #848

Open
@mman

Description

@mman

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 {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions