Skip to content

Enable value transfers in shared worker messagesΒ #2733

@novemberborn

Description

@novemberborn

From #2705, when publishing shared worker messages, or replying to an individual message, we should enable values to be transferred.

I don't think a second "transfer list" API is a good fit for the shared worker API. Perhaps we could add a chaining API like .transferring(buffer1, messagePort2).publish({buffer1, messagePort2}) and .transferring(buffer1, messagePort2).reply({buffer1, messagePort2}).

Values can only be transferred once. This also means we can't add this to the .broadcast() method.

See:

reply: (data: Data) => PublishedMessage<Data>;

publish: (data: Data) => PublishedMessage<Data>;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions