-
Notifications
You must be signed in to change notification settings - Fork 417
Open
Description
Related to #372
Although there are ways of getting around this, it would make things much more convenient to expose the endpoint on a proxy property. I'm using comlink-loader, which makes it impossible to access the original WebWorker instance.
What I'd love is something like:
import { endpointMarker } from 'comlink'
import myProxy from 'webpack/magic/here'
// do a long job...
myProxy.doStuff().then(...)
// oops i want to cancel
let worker = myProxy[endpointMarker]
worker.terminate()
I imagine this would be easy enough to implement. Hoping you think so too! :)
Metadata
Metadata
Assignees
Labels
No labels