From 9b19bfd4c058d205edc431c071410ef46f58e3bf Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Wed, 26 Apr 2023 08:16:52 -0700 Subject: [PATCH] Updated the threading notice for platform channel responses. (#7901) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This updates the guidelines about threading and the responses to platform channels. Once the following PRs are on `main` all official platforms (minus web where it doesn't make sense) support thread-safe responses. issue: https://github.com/flutter/flutter/issues/93945 Do no land until the following are on stable: 1) https://github.com/flutter/engine/pull/37689 1) https://github.com/flutter/engine/pull/37607 1) https://github.com/flutter/engine/pull/36909 ## Presubmit checklist - [x] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer. Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com> Co-authored-by: Parker Lougheed --- src/platform-integration/platform-channels.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/platform-integration/platform-channels.md b/src/platform-integration/platform-channels.md index 746870047e7..c45ad6e8d60 100644 --- a/src/platform-integration/platform-channels.md +++ b/src/platform-integration/platform-channels.md @@ -1222,8 +1222,7 @@ either invoke them from any `Isolate` that is the root The handlers for the platform side can execute on the platform's main thread or they can execute on a background thread if using a Task Queue. You can invoke the platform side handlers asynchronously -and on any thread when the Task Queue API is available; -otherwise, they must be invoked on the platform thread. +and on any thread. {{site.alert.note}} On Android, the platform's main thread is sometimes