RFC: WebWorker #212
Labels
[STAGE-2] incomplete implementation
Remove this label when implementation is complete
[STAGE-2] not fully covered by tests yet
Remove this label when tests are verified to cover the implementation
[STAGE-2] unresolved discussions left
Remove this label when all critical discussions are resolved on the issue
[STAGE-3] docs changes not added yet
Remove this label when the necessary documentation for the feature / change is added
[STAGE-3] missing 2 reviews for RFC PRs
Remove this label when at least 2 core team members reviewed and approved the RFC implementation
Champion
@GrandSchtroumpf
What's the motivation for this proposal?
Problems you are trying to solve:
worker$
cannot be terminatedworker$
doesn't support streamingGoals you are trying to achieve:
Any other context or information you want to share:
Proposed Solution / Feature
What do you propose?
A
createWorker$(qrl)
that can run the qrl inside a web worker and expose a low level API to interact with it :Code examples
Add support for AbortController to existing
worker$
Stream data from a worker:
Compute inside a worker :
Questions :
With this implementation we always return a
ReadableStream
from thecreate()
method to have a native support of AsyncGenerators.This makes this low level API harder to work with, but since it's low level I thought it's ok.
A better solution might be a mix of Typescript & runtime code to know if the is an AsyncGenerator or not :
Do you think we should always return Promise, or it should depends on the QRL output ?
Currently
create
open the webworker, run the qrl inside and returns the value if any.Do you think we should split the
create
that would open the webworker andapply
that would run the QRL ?PRs/ Links / References
No response
The text was updated successfully, but these errors were encountered: