8 ms·
I am against IO event loops :). Scroll down to the bottom of the README and look for fibonacci(35) to see how I solve the problem mentioned in the link. The ex
by halayli 15y ago
I am against IO event loops :).
Scroll down to the bottom of the README and look for fibonacci(35) to see how I solve the problem mentioned in the link. The example is a naive HTTP server that computes fibonacci on every request and replies back.
- willvarfar 15y agoYes I saw before I posted :) You move it explicitly to its own thread. What would happen if you didn't do that? My article is applicable to `lthread` too. Its a discussion about what happens to fib(35) or any blocking task running in a multiplexing-tasks-in-a-thread setup really.
- halayli 15y agoWhat happens is that it will block the other lthreads, bringing down the RPS to its knees. lthreads are simply coroutines and cooperation/trust are required to maintain fairness.