Chris Yang 4e696fc84d Unmerge threads if the current merger is the only one that's merged. (flutter/engine#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 https://github.com/flutter/flutter/issues/127168

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-07-13 22:17:21 +00:00
Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%