Open Strate opened 6 years ago
Hi,
I'm implementing a queue system, using https://caolan.github.io/async/docs.html#queue
And I need to enforce each worker run with empty new context. I found this way:
cosnt ns = clsHooked.createNamespace("test"); function runInNewContext(fn) { return ns.bind(fn, {})() }
Is this a best way to do this, or there is a better way?
Hi,
I'm implementing a queue system, using https://caolan.github.io/async/docs.html#queue
And I need to enforce each worker run with empty new context. I found this way:
Is this a best way to do this, or there is a better way?