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 have a simple main / worker messaging demo that consumes memory continuously. The below sample will consume > 1GB after 10 minutes.
OS: Windows 10
Env: VMWare VM with 4 virtual procs and 32 GB RAM
Deno 1.1.0
to run: deno run --allow-read parent.js
parent.js
letworker=newWorker(newURL("worker.js",import.meta.url).href,{type: "module"});letstruct={headers: ["database",1,2],value: 1};worker.postMessage(struct);worker.onmessage=async(e)=>{let{ got, hit }=e.data;if(hit)console.log("hit: "+got);struct.value=got+1;worker.postMessage(struct);};
worker.js
letexpected=12345;letstruct={got: null,hit: null,};self.onmessage=async(e)=>{const{ value }=e.data;if(value%10000===0)console.log(value);struct.got=value;struct.hit=value===expected;postMessage(struct);};
The text was updated successfully, but these errors were encountered:
I'm also able to replicate this on macOS, I think it might be related to this issue. But fortunately the memory will be freed once the worker is terminated via invoking worker.terminate().
I have a simple main / worker messaging demo that consumes memory continuously. The below sample will consume > 1GB after 10 minutes.
OS: Windows 10
Env: VMWare VM with 4 virtual procs and 32 GB RAM
Deno 1.1.0
to run:
deno run --allow-read parent.js
parent.js
worker.js
The text was updated successfully, but these errors were encountered: