Skip to content

Mailbox used by transmit and transmit_preserve not exposed #61

Description

@EvanLF6768

Currently the mailbox which a message is inserted into by transmit and transmit_preserve is not exposed to users. This feels like a design oversight as the mailbox is passed to the transmit_preserve callback.

Access to this value is useful as it can allow for additional metadata to be stored about pending frames which wouldn't fit inside the existing marker field (using an array indexed by Mailbox). For example a time to live value to determine whether a frame evicted by transmit_preserve should be placed back into a software queue or discarded.

This can be solved by modifying the return types of transmit and transmit_preserve to nb::Result<(Mailbox, Option<()>), Infallible> and nb::Result<(Mailbox, Option<P>), Infallible> respectively. As this would be a breaking change, I am seeking comments on whether or not these should be implemented as new separate functions instead before I proceed to implementing this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions