Closed CatsMiaow closed 4 years ago
Hi @CatsMiaow,
Thanks for this issue! Actually, this is how microjob works right now but, no, I don't like it either. The context is passed as global, with no reference with the outer scope and that sucks. I'd like to refactor this part and let the user using a local variable to refer to it.
This regards also this PR: https://github.com/wilk/microjob/pull/51
Thank you for answer. I hope the #48, #51 PRs are reviewed.
https://github.com/wilk/microjob/blob/master/src/worker-pool.ts#L89 The function disappears from JSON.stringify.
Reference https://stackoverflow.com/a/57668208
What do you think about this?