Here's my issue with this kind of "magic" API design:<p>It's not clear when or how serialization happens.<p>Supposedly at some point the message I am sending to the worker is serialized, but this is not made clear to the user and it's not made clear <i>when</i> this happens.<p>A well-designed library would synchronously serialize the given object the moment it is passed in or let the user explicitly handle serialization. But I don't think that's what is happening here.<p>It appears messages are serialized only eventually and when they are finally sent off to a worker.<p>If you accidentally pass mutable state in here, you're in for a really confusing and fun debugging session. Likely it'll be a production-only bug too, because during development and testing you're unlikely to have the kind of message volume required to run into some modified-before-sent condition.<p>CTRL-F "mutable" and CTRL-F "serialize" gives no results, so I don't think the designers thought of this or thought to warn users.
What would be nice is a way of preventing the same job running multiple times concurrently. Like if I start a job and a job with the same parameters was already started milliseconds ago then it automatically awaits the already running job rather than starting another.
Interesting that it's written in typescript and the readme doesn't mention using it with typescript. I ran into annoyances with this recently trying out nodes worker threads in a typescript project. I was running with ts-node, but the worker thread didn't know how to load a typescript file. There are some workarounds but they're not elegant.
Neat! I’m friends with the creator of this and teased him a bit about the name (so many of these projects have weird names now a day)<p>The reason is: don’t wanna be boring from what I could glean.
u remind me my own researching project too.<p><a href="https://github.com/tim-hub/pambdajs" rel="nofollow">https://github.com/tim-hub/pambdajs</a>
Is it just me, or do I see a trend in naming projects using romance language words (Italian/Spanish/France)?<p>Does it sound more exotic? Are these words less crowded?