You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iOS DisplayLinkManager should be main actor #190725
Since in iOS embedder ui / platform threads are merged, and there's no way to opt out, we should make it a MainActor (and remove the locks), as this is purely a UI bound concept.
This will be a while out but agreed that yes, whatever is left of this (if anything) should be mainActor. Right now there's still a lot of very delicate C++ threading around this.
Worth noting that this will cause crashes for certain people creating off-main-thread engines without additional work: #190909
Whether that's a supported use-case or not is something we'll need to discuss. Assigning to @cbracken@LongCatIsLooong@hellohuanlin purely to come to agreement on how to address that issue and what it means for this one.
Right now there's still a lot of very delicate C++ threading around this.
If we encounter a code where we know it must be main actor, but not yet known to the compiler due to C++, we could use MainActor.assumeIsolated API for that.
Activity
cbracken commentedon Aug 10, 2026
This will be a while out but agreed that yes, whatever is left of this (if anything) should be
mainActor. Right now there's still a lot of very delicate C++ threading around this.cbracken commentedon Aug 13, 2026
Worth noting that this will cause crashes for certain people creating off-main-thread engines without additional work:
#190909
Whether that's a supported use-case or not is something we'll need to discuss. Assigning to @cbracken @LongCatIsLooong @hellohuanlin purely to come to agreement on how to address that issue and what it means for this one.
cbracken commentedon Aug 13, 2026
We should annotate
[FlutterEngine run]this way too since that's what creates the DisplayLinkManager under the hood.hellohuanlin commentedon Aug 18, 2026
If we encounter a code where we know it must be main actor, but not yet known to the compiler due to C++, we could use
MainActor.assumeIsolatedAPI for that.iOS: Ensure engine is run on the main thread (flutter#191626)