Skip to content

[ffigen] Use one NativeCallable.listener for all listener blocks #1760

@liamappelbe

Description

@liamappelbe

Atm we have one NativeCallable.listener per block signature. Each NativeCallable.listener has its own receive port. This means that two callbacks with different signatures can be called in a different order to the order that the native thread called them in. This can cause problems, especially for protocol implementers.

To fix this we can use a single NativeCallable.listener for all blocks in the isolate. The downside of this is it'll involve dynamic dispatch, which is slightly inefficient. But I think that's negligible in this async case.

dart-lang/http#1413

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions