Open tommy-mitchell opened 11 months ago
I'm not sure if this is a limitation of this library or of Workers in general, but I was expecting the following code to log each index:
import { greenlet } from "tinylet"; const func = greenlet(() => { let count = 0; for (let i = 0; i < 1000; i++) { count = i + 1; console.log(`Item: ${i}`); } return count; }); const count = await func(); console.log({ count });
However, the actual output is:
Item: 0 { count: 1000 }
Why does it only log inside of the worker once?
I'm not sure if this is a limitation of this library or of Workers in general, but I was expecting the following code to log each index:
However, the actual output is:
Why does it only log inside of the worker once?