4 ms·
This is great! Async still has its place for extremely low latency requirements, but threads should be good enough for almost every problem.
by darthrupert 4y ago
This is great! Async still has its place for extremely low latency requirements, but threads should be good enough for almost every problem.
- iroddis 4y agoWhat kind of latency are you talking about? Async latency for completing a task isn’t deterministic, and there’s no guarantee data will be processed as soon as it becomes available. Async runtimes rely heavily on hints from their tasks as to when to poll next. Generally, low latency means producing a result as soon as possible. Threads are ideal for that case, expending spinning cpu time for asap processing. The best description I’ve heard of async is concurrent waiting, vs concurrent processing for threads (from the excellent zero2prod book).
- zamalek 4y agoWhat? The known/accepted tradeoff of async is gaining scalability (max concurrent connections) at the cost of latency.
- darthrupert 4y agoIndeed. Dunno what I was thinking there. Thanks for the correction!