Skip to content

[pigeon] Update task queue handling#8627

Merged
auto-submit[bot] merged 10 commits intoflutter:mainfrom
stuartmorgan-g:pigeon-task-queue-update
Feb 15, 2025
Merged

[pigeon] Update task queue handling#8627
auto-submit[bot] merged 10 commits intoflutter:mainfrom
stuartmorgan-g:pigeon-task-queue-update

Conversation

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

Updates the task queue implementation across all supporting generators to use one task queue for an entire host API, rather than one per method, so that multiple methods using task queues will have ordering guarantees amongst them. Also changes the Obj-C implementation to no-op on macOS instead of failing to compile, so that shared iOS/macOS code can use task queues on iOS without breaking macOS. (We could deliberately add a compile error with a clear error message in a macOS ifdef if we get reports of user confusion in the future, but my expectation is that no-op is the best option for most people.)

Related changes:

  • Adds integration testing that task queues work, instead of just that the generator step succeeds.
    • For platforms that don't support task queues, they are still included in the integration test to ensure that
    • I removed the now-vestigial background_platform_channels.dart.
  • Adds Swift support, since it was easier to add than to skip it in the tests.

Fixes flutter/flutter#162624
Fixes flutter/flutter#111512

Pre-launch Checklist

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pigeon] Task queues should be serial across a HostApi instance [pigeon] Support TaskQueue when using Swift

2 participants