You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice that blobs transfered over workers aren't readable at all.
it only applies to blobs coming from fs.openAsBlob
in-memory constructed blobs works fine.
mini repro:
import{Worker}from'worker_threads'constworker=newWorker('./worker.js')worker.once('message',blob=>{// worker.terminate() // Should be fine to do this as wellblob.text()})
Disallow cloning of file-backed Blobs. If necessary, we can enable
this later but for now we disable it. The reason is because the
underlying FdEntry ends up bound to the Environment/Realm under
which is was created and transfering across worker threads ends up
failing.
Fixes: nodejs#47334
Disallow cloning of file-backed Blobs. If necessary, we can enable
this later but for now we disable it. The reason is because the
underlying FdEntry ends up bound to the Environment/Realm under
which is was created and transfering across worker threads ends up
failing.
Fixes: #47334
PR-URL: #47574
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
I notice that blobs transfered over workers aren't readable at all.
fs.openAsBlob
mini repro:
I would assume that if you also closed the worker it would still work just fine to read the blob, even if it came from another thread...
originally posted by @jimmywarting in #45258 (comment)
maybe also worth trying out to write a test that also use
MessageChannel
?...haven't tested if
MessageChannel
works or not.The text was updated successfully, but these errors were encountered: