Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pigeon] Support TaskQueue when using Swift #111512

Open
Jordan-Nelson opened this issue Sep 13, 2022 · 1 comment · May be fixed by flutter/packages#8501
Open

[pigeon] Support TaskQueue when using Swift #111512

Jordan-Nelson opened this issue Sep 13, 2022 · 1 comment · May be fixed by flutter/packages#8501
Labels
p: pigeon related to pigeon messaging codegen tool P3 Issues that are less important to the Flutter project package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team

Comments

@Jordan-Nelson
Copy link

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

@stuartmorgan stuartmorgan added platform-ios iOS applications specifically p: first party package flutter/packages repository. See also p: labels. p: pigeon related to pigeon messaging codegen tool P3 Issues that are less important to the Flutter project labels Sep 13, 2022
@tbagave
Copy link

tbagave commented Oct 17, 2022

When can we expect to have this supported? Is there a work around whereby we can enable it for iOS+Swift apps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: pigeon related to pigeon messaging codegen tool P3 Issues that are less important to the Flutter project package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants