-
Notifications
You must be signed in to change notification settings - Fork 48
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
refactor: webWorker is optionally passed on last argument #1032
refactor: webWorker is optionally passed on last argument #1032
Conversation
b1e90c8
to
5ea2242
Compare
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.
This API change makes sense to me. In the future, are you thinking of automaticly terminating the worker in runPipeline
if no worker option is passed?
In runPipeline and bindgen browser typescript functions, the webWorker is no longer the first argument but passed on the last options argument. BREAKING_CHANGE: webWorker is optionally passed on last argument
A way to identify that a worker has been terminated.
This prevents the need to call .terminate() on the work to avoid resource leaks. .terminate() can still be called, but the worker is re-used by default for performance.
I added a commit so that calling |
5ea2242
to
e905aac
Compare
…efault To avoid detached buffers, copy ArrayBuffer's for inputs by default. This is not necessary for outputs, where ownership is transferred to the caller. For cases where the inputs are not needed further, a `noCopy` option can be explicitly passed.
And add API description in README's.
webWorker is moved from the first argument to a property on the last `options` argument. See also commit 1268a9a
39964ea
to
db69b8d
Compare
Includes breaking API changes (see itk-wasm repo BREAKING_CHANGES.md for itk-wasm 1.0.0-b160).
Removed in @itk-wasm/image-io 1.0.0 and passed as an option.
The pyodide ffi to_js has already copied.
e2d6a5a
into
InsightSoftwareConsortium:main
Re #1018