-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DONT MERGE] feat(webworker): Reworking Web Worker API and new WebWorkerManager #880
Conversation
RequestPoolManager
✅ Deploy Preview for cornerstone-3d-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
configuration.
external modules
package.json and karma.conf.js.
RequestPoolManager
} | ||
|
||
this.workerTypes[workerName].instances.forEach((workerInstance) => { | ||
workerInstance[Comlink.releaseProxy](); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the worker is running something? Does Comlink
waits for it to complete the task before destroying it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should not be worried about that since all workers may not be destroyed at any time, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that is a problem
Will work on it here #1313 and will bring it to |
I will close this in favor of the cornerstone 2.0 PR #1400 |
Most likely we won't merge this into
main
the diff is just easier to see to the mainWe will merge this one first , and in cornerstone3D 2.0 we will move all decoders to the new manager as well to have central place to manage all.
Context
This PR reworks the web worker API and proposes a new set of methods to work with workers to make developers life so much easier to be able to run a function of the main thread
Changes & Results
Testing
You should be able to follow the added documentation to easily write, register and execute a function in a way that makes a lot of sense.
Checklist
PR
semantic-release format and guidelines.
Code
[] My code has been well-documented (function documentation, inline comments,
etc.)
[] I have run the
yarn build:update-api
to update the API documentation, and havecommitted the changes to this PR. (Read more here https://www.cornerstonejs.org/docs/contribute/update-api)
Public Documentation Updates
additions or removals.
Tested Environment