-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
I had thought that Pigeon's task queue implementation shared a task queue for the entire HostApi, but while looking at some generated code I noticed that each method (each of which is its own channel) is getting its own task queue. That means that calls like:
a(1), b(1), a(2), b(2)
from Dart could execute on the native side as any of:
a(1), b(1), a(2), b(2)
a(1), a(2), b(1), b(2)
b(1), b(2), a(1), a(2)
a(1), b(1), b(2), a(2)
b(1), a(1), a(2), b(2)
That's not what we would want for any use case I can think of, and definitely not for the two cases where our plugins are using them. We should instead make everything in a HostApi share a task queue instance so that we have the same cross-method serialization behavior that we would have without them, just on a non-main thread.