Skip to content

Dart transfer tokens cannot report the loss of every alias #408

Description

@sargunv

Tracked from the Dart binding review log on the dart branch (#187).

ResourceRequestToken is isolate-sendable and may have independent copies. The native registry releases it on explicit completion or close, but cannot identify when every Dart copy has been lost. A finalizer on one copy could terminate a request still owned by another isolate, and making the token Finalizable would make it unsendable — Dart refuses to send Finalizable instances across isolate boundaries.

The same tension produced a second, narrower gap tracked separately: WakeSource drops leak reporting entirely to stay transferable.

Suggested next step: design registry-backed alias leases, or an explicit transfer protocol with deterministic last-owner reporting.

Area: owned-handle leak reporting. Severity: medium. Complexity: high.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dartBinding or example for dartenhancementErgonomics or design of an existing capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions