Skip to content

[pigeon] Support TaskQueue when using Swift #111512

@Jordan-Nelson

Description

@Jordan-Nelson

Use case

Pigeon supports using swift for iOS/MacOS and objective-c for iOS. TaskQueue is supported for objective-c, but the @TaskQueue annotation from pigeon does not seem to have any impact when using swift & iOS. The following code will use TaskQueue when using objective-c, but not swift.

@HostApi()
abstract class MyAPI {
  @async
  @TaskQueue(type: TaskQueueType.serialBackgroundThread)
  void doSomething();
}

Proposal

Add support for TaskQueue when using swift on iOS. One consideration is that TaskQueue is not supported on MacOS. Users will either need to know this, and only attempt to use it for iOS plugins, or pigeon could use TaskQueue on iOS only (not sure of the feasibility of that).

Reference

@TaskQueue from pigeon: https://pub.dev/documentation/pigeon/latest/pigeon_lib/TaskQueue-class.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectp: pigeonrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions