3 ms·
It is. The single-threaded example comes before the "versus". The async example comes after. I should have been more clear.
by rukittenme 6y ago
It is. The single-threaded example comes before the "versus". The async example comes after. I should have been more clear.
- detaro 6y agoAh, indeed misread that. Then my answer is: Singlethreaded code sometimes has to implement things an async environment would handle for you. I.e. when handling many in- and outputs I can write my own loop around epoll etc, write logic to keep of track of queues of data to send per-target etc. Or I can use a runtime that provides that for me and lets me mostly pretend things are running on their own.