Known Issues
Known Limitations
Section titled “Known Limitations”No General Cancellation Mechanism
Section titled “No General Cancellation Mechanism”There is no general async cancellation. Cancelling a Stream subscription only stops new events from being delivered; the C++ side continues running and silently drops subsequent add() calls.
Codegen Is Not a Build Step
Section titled “Codegen Is Not a Build Step”Code generation must be run manually after API header changes. The Native Assets hook only handles compilation and linking; it does not regenerate code.
Type Aliases Are Not Supported
Section titled “Type Aliases Are Not Supported”codegen cannot parse using Foo = ... or typedef .... Use the actual type directly in headers and write out the full namespace.
Opaque Class Limitations
Section titled “Opaque Class Limitations”- Cannot be shared across Isolates
- Inheritance, virtual functions, and method overloading are not supported
- Field access requires hand-written getter/setter methods
Common Pitfalls
Section titled “Common Pitfalls”- Blocking work must use
spawn_blockingor be posted to thethread_pool set_pool_threads()must be called beforeRuntime::start()- The Runtime uses one io runner by default; configure
ioThreadsbefore startup when multiple runners are needed, and synchronize shared state accordingly - Multiple io runners do not make blocking waits safe: raw
stdexec::sync_waitoccupies its runner until completion, and blocks the whole scheduler if every runner waits for work on that scheduler;dcb::sync_waitrejects io runners - Generated code must be regenerated manually by running
dcb_gen_tool generate - Headers should contain only declarations; data classes and opaque classes must be defined inside the scanned headers
DartFn::operator()is async only; for blocking calls usedcb::sync_wait(...)from a worker or external thread, and never do so on the io thread