3 ms·
ASIO should have been good enough but didn't help itself with really poor documentation. Async, and the associated battles with how it should be done, hasn't e
by secondcoming 5y ago
ASIO should have been good enough but didn't help itself with really poor documentation.
Async, and the associated battles with how it should be done, hasn't exactly shone C++ with glory. std::future was broken from the get-go and only enabled pseudo-aysnchronicity (the thread calling get() is blocked). std::async is pointless, and std::task... meh.
Coroutines too have duelling proposals I believe.
Personally, it seems like I'll still be using ASIO to save me from the socket boilerplate code and will push 'work' onto queues served by dedicated threads.
Sender/Receiver looks interesting. Eric Neibler gave an interesting talk on them on youtube. But if they, too, force me into a pattern where a thread spawns a chain of async tasks, and then waits/blocks at the end for them to complete, then I don't see this as much of an improvement. Maybe it's really just a more lightweight std::future? Only time will tell.
- ProfHewitt 5y agoAs dueling co-routine proposals neither ASIO nor Sender/Receiver are a suitable foundation for C++ semantics.