asyncmind on Nostr: Idk where you get your info but erlang is 30 years old .. nd it scalea to millions of ...
Idk where you get your info but erlang is 30 years old .. nd it scalea to millions of processs on a laptop try and see for yourself
-module(spawn_million).
-export([start/0, process/0]).
start() ->
spawn_processes(1000000).
spawn_processes(0) ->
done;
spawn_processes(N) ->
spawn(?MODULE, process, []), % Spawn a new process
spawn_processes(N - 1).
process() ->
receive
stop -> ok
end.
Published at
2024-10-21 21:22:04Event JSON
{
"id": "aa2918497c1b76732e322f18eaa9bc07ad75ade40b46eb78f33a181a125cfffa",
"pubkey": "16d114303d8203115918ca34a220e925c022c09168175a5ace5e9f3b61640947",
"created_at": 1729545724,
"kind": 1,
"tags": [
[
"e",
"fc70b89cd86dfdf3739c7daa274c298a19917b1966812f543a0fa44fff370816",
"",
"root"
],
[
"e",
"2c5b8fe3eb2df70e27c0751d92a9147f6a4adfa7dc6fd5eaf87dfb8c3b44b7db"
],
[
"e",
"a4ae63f4d10c3c8087d0f1fee197b50695a236fc1c65967b21aca2b7ce37dc58",
"",
"reply"
],
[
"p",
"55f573b651eff351db57b0601d23022d8c532f9825db10a5733ebf39be4aa21b"
],
[
"p",
"16d114303d8203115918ca34a220e925c022c09168175a5ace5e9f3b61640947"
],
[
"p",
"4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f"
]
],
"content": "Idk where you get your info but erlang is 30 years old .. nd it scalea to millions of processs on a laptop try and see for yourself \n\n\n-module(spawn_million).\n\n-export([start/0, process/0]).\n\nstart() -\u003e\n spawn_processes(1000000).\n\nspawn_processes(0) -\u003e \n done;\nspawn_processes(N) -\u003e\n spawn(?MODULE, process, []), % Spawn a new process\n spawn_processes(N - 1).\n\nprocess() -\u003e\n receive\n stop -\u003e ok\n end.",
"sig": "8c0bf12eb92f8a5052861725ba4b36350af5e872e863f63be411e908d150d45bb8f167e9021c2f602dc31d66b318de7fa622c3425bf002f50b592fb66a8331e9"
}