383 karma · joined May 9, 2023
Hmm, wasn't the whole point of doing things in event loop because it way out perform thread-based architecture? Like when Nginx way out performs Apache? On a single core CPU of course.
Edit: It is not that event-loop is better than thread-based, just in a web server scenario it just perform much better.
Isn't that implementation of semaphore? I would imagine that should already being done in the CPU implementation?
>``` const someInitializedModule = require("module-name")(someOptions); ```
That can partially be done such as:
import {jason} from 'https://example.com/foo.js?name=jason
On the script site use: const url = new URL(import.meta.url); console.log(`${url.searchParams.get("name")`);
Worker on the client side:
https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers...
Server-side/nodejs: https://nodejs.org/api/worker_threads.html#worker_threads_wo...