Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Document that all MethodChannel callbacks must be called on the main thread.#6245

Merged
jason-simmons merged 1 commit into
flutter-team-archive:masterfrom
nichtverstehen:master
Sep 27, 2018
Merged

Document that all MethodChannel callbacks must be called on the main thread.#6245
jason-simmons merged 1 commit into
flutter-team-archive:masterfrom
nichtverstehen:master

Conversation

@nichtverstehen

Copy link
Copy Markdown
Contributor

This further addresses flutter/flutter#14568.

This aspect was not immediately obvious to my team as a Flutter user and led me to inspecting the implementation, so I figured documenting this in-place would be useful.

* interface for handling results received from Flutter.
*
* <p>All methods of this class must be called on the platform thread (Android main thread). For more details see
* <a href="https://github.com/flutter/engine/wiki/Threading-in-the-Flutter-Engine">Threading in the Flutter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a check for invocation of nativeInvokePlatformMessageResponseCallback on the wrong thread. Or have the BinaryReply object run the reply action on the platform thread.

@chinmaygarde @matthew-carroll

@chinmaygarde

Copy link
Copy Markdown
Contributor

Can this be committed?

@jason-simmons jason-simmons merged commit 27f77cb into flutter-team-archive:master Sep 27, 2018
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 28, 2018
flutter-team-archive/engine@d80c1de...8176f4d

git log d80c1de..8176f4d --no-merges --oneline
8176f4d Roll buildroot to 96d2493 (flutter-team-archive/engine#6364)
27f77cb Document that all MethodChannel callbacks must be called on the main thread. (flutter-team-archive/engine#6245)
e6c1733 Script to verify exported symbols on release binaries (flutter-team-archive/engine#6363)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/&#43;/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC&#39;d on the roll, and stop the roller if necessary.
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Sep 28, 2018
flutter-team-archive/engine@d80c1de...8176f4d

git log d80c1de..8176f4d --no-merges --oneline
8176f4d Roll buildroot to 96d2493 (flutter-team-archive/engine#6364)
27f77cb Document that all MethodChannel callbacks must be called on the main thread. (flutter-team-archive/engine#6245)
e6c1733 Script to verify exported symbols on release binaries (flutter-team-archive/engine#6363)


The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/&#43;/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC&#39;d on the roll, and stop the roller if necessary.
GaryQian pushed a commit to GaryQian/engine that referenced this pull request Oct 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

4 participants