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

Unmerge threads if the current merger is the only one that's merged. #43652

Merged
merged 6 commits into from
Jul 13, 2023

Conversation

cyanglaz
Copy link
Contributor

@cyanglaz cyanglaz commented Jul 13, 2023

UnMergeNowIfLastOne is called during shell destruction. When there are other shells with threads unmerged and the current destroying shell with thread merged. UnMergeNowIfLastOne should unmerge the threads.

This PR Make UnMergeNowIfLastOne not only unmerge if the current merger is the last merger, but also unmerge if the current merger is the last merger that is merged.

Fixes flutter/flutter#127168

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@cyanglaz cyanglaz requested review from gaaclarke and dnfield July 13, 2023 19:17
@cyanglaz cyanglaz added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 13, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 13, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jul 13, 2023

auto label is removed for flutter/engine, pr: 43652, due to - The status or check suite Linux mac_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label.

@cyanglaz cyanglaz added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 13, 2023
@auto-submit auto-submit bot merged commit 7b7abd1 into flutter:main Jul 13, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 13, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 14, 2023
…130538)

flutter/engine@0f0436b...8a42bfc

2023-07-13 skia-flutter-autoroll@skia.org Roll Skia from 52613fcc0780 to 9e4f5cc3aeb4 (1 revision) (flutter/engine#43659)
2023-07-13 jonahwilliams@google.com [Impeller] no-op fragment program on Android until it works. (flutter/engine#43657)
2023-07-13 31859944+LongCatIsLooong@users.noreply.github.com Reland #43118 "Add a flag to ParagraphBuilder for rounding hack migration" (flutter/engine#43647)
2023-07-13 ychris@google.com Unmerge threads if the current merger is the only one that's merged. (flutter/engine#43652)
2023-07-13 dnfield@google.com Revert flutter/engine#43533 (flutter/engine#43654)
2023-07-13 skia-flutter-autoroll@skia.org Roll Skia from 743ad92f5de2 to 52613fcc0780 (9 revisions) (flutter/engine#43655)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
kjlubick pushed a commit to kjlubick/engine that referenced this pull request Jul 14, 2023
…lutter#43652)

`UnMergeNowIfLastOne` is called during shell destruction. When there are other shells with threads unmerged and the current destroying shell with thread merged. `UnMergeNowIfLastOne` should unmerge the threads. 

This PR Make `UnMergeNowIfLastOne` not only unmerge if the current merger is the last merger, but also unmerge if the current merger is the last merger that is merged.

Fixes flutter/flutter#127168

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
harryterkelsen pushed a commit to harryterkelsen/engine that referenced this pull request Jul 20, 2023
…lutter#43652)

`UnMergeNowIfLastOne` is called during shell destruction. When there are other shells with threads unmerged and the current destroying shell with thread merged. `UnMergeNowIfLastOne` should unmerge the threads. 

This PR Make `UnMergeNowIfLastOne` not only unmerge if the current merger is the last merger, but also unmerge if the current merger is the last merger that is merged.

Fixes flutter/flutter#127168

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jul 31, 2023
…lutter#130538)

flutter/engine@0f0436b...8a42bfc

2023-07-13 skia-flutter-autoroll@skia.org Roll Skia from 52613fcc0780 to 9e4f5cc3aeb4 (1 revision) (flutter/engine#43659)
2023-07-13 jonahwilliams@google.com [Impeller] no-op fragment program on Android until it works. (flutter/engine#43657)
2023-07-13 31859944+LongCatIsLooong@users.noreply.github.com Reland flutter#43118 "Add a flag to ParagraphBuilder for rounding hack migration" (flutter/engine#43647)
2023-07-13 ychris@google.com Unmerge threads if the current merger is the only one that's merged. (flutter/engine#43652)
2023-07-13 dnfield@google.com Revert flutter/engine#43533 (flutter/engine#43654)
2023-07-13 skia-flutter-autoroll@skia.org Roll Skia from 743ad92f5de2 to 52613fcc0780 (9 revisions) (flutter/engine#43655)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@dodatw
Copy link

dodatw commented Oct 14, 2023

Is this fixing include in flutter 3.13.7 ?
I try the sample code in flutter/flutter#127168
It still can reproduce with flutter 3.13.7

@cyanglaz cyanglaz deleted the engine_group_freeze branch October 16, 2023 16:14
@cyanglaz
Copy link
Contributor Author

cyanglaz commented Oct 16, 2023

Is this fixing include in flutter 3.13.7 ? I try the sample code in flutter/flutter#127168 It still can reproduce with flutter 3.13.7

This is not currently in stable, please feel empowered to open a cherry-pick request: https://github.com/flutter/flutter/issues/new?assignees=itsjustkevin%2Ccaseyhillers&labels=cp%3A+review&projects=&template=7_cherry_pick.yml&title=%5BCP%5D+%3Ctitle%3E

cyanglaz pushed a commit to cyanglaz/engine that referenced this pull request Oct 24, 2023
…lutter#43652)

`UnMergeNowIfLastOne` is called during shell destruction. When there are other shells with threads unmerged and the current destroying shell with thread merged. `UnMergeNowIfLastOne` should unmerge the threads. 

This PR Make `UnMergeNowIfLastOne` not only unmerge if the current merger is the last merger, but also unmerge if the current merger is the last merger that is merged.

Fixes flutter/flutter#127168

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
@arthurmonteiroalvesmelo

@cyanglaz Did you fix this problem flutter/flutter#127168 ? I'm having this problem in 3.24.3 with FlutterEngineGroup on iOS.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

When disposing of a FlutterEngine while a PlatformView is being displayed, gestures on other FlutterEngines no longer work.
4 participants