Skip to content

Re-proxying across threads #671

@eyyyyyyy3

Description

@eyyyyyyy3

Let's say we have the main thread A and the web worker B which is spawned by A and the web worker C which is spawned by B. Now we create a callback function within C that we want to attach to some event in A. In C we proxy the callback function as follows: const proxyListener = Comlink.proxy(listener); and then pass the proxy to B. Is it necessary to re-proxy the proxy from C in B to A? I tested it and it works without re-proxying but I don't know if this is the right way of doing it.

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