-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Currently many core plugin APIs in Windows are platform-thread only, as on other platforms. However, as discussed in flutter/engine#31134 (review) and #79213 this doesn't work well on Windows, both in terms of OS APIs to facilitate it (there aren't any, unlike other platforms), and convention (Win32 APIs generally don't care what thread you are on). To better match platform conventions, we should make APIs like sending channel messages internally thread safe (by having the embedding internally post them to the platform thread, which we already have a mechanism for).
This may well be straightforward for the C API, but we'll need to make the C++ wrapper that almost all code actually uses that safe as well, which may require some locking.
(We would only do one of #79213 and this.)