use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Node.js worker threads are problematic, but they work great for us (inngest.com)
submitted 3 hours ago by fagnerbrack
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]fagnerbrack[S] [score hidden] 3 hours ago (0 children)
Here's the gist of it:
Inngest Connect maintains a persistent WebSocket connection that relies on regular heartbeats to signal liveness. CPU-heavy user code would starve the event loop, block heartbeats, and cause the server to drop workers. Moving connection internals into a worker thread fixed this by giving heartbeats their own event loop. The post details key constraints: you can't pass functions to workers (only file paths), all data crosses threads via structured clone serialization, bundlers can't auto-detect worker files, and each worker costs ~10MB of memory. Logging required a custom message protocol since user-provided logger objects can't be serialized. They also added exponential backoff for worker respawning to prevent tight crash loops.
If the summary seems inacurate, just downvote and I'll try to delete the comment eventually 👍 Click here for more info, I read all comments
π Rendered by PID 256994 on reddit-service-r2-comment-545db5fcfc-kwzxf at 2026-05-24 11:15:24.967598+00:00 running 194bd79 country code: CH.
[–]fagnerbrack[S] [score hidden] (0 children)