[-] MantisWaffle@lemmy.world 0 points 5 months ago

Threads are callbacks.

[-] MantisWaffle@lemmy.world -2 points 5 months ago* (last edited 5 months ago)

The only way I have heard threads are expensive, in the context of handling many io requests, is stack usage. You can tell the os to give less memory (statically determined stack size) to the thread when it's spawned, so this is not a fundamental issue to threads.

Go ahead and spin up a web worker and transfer a bunch of data to it and tell us how long you had to wait.

Time to transfer data to one thread is related to io speed. Why would this have anything to do with concurrency model?

view more: ‹ prev next ›

MantisWaffle

joined 1 year ago