SRP for Function Calls in C++
summary
Claims that std::packaged_task (in <future>) cleanly separates invoking work from retrieving results, shows a four-line pattern that reproduces std::async without its join-on-destruction behavior, and reveals the real pain: figuring the returned type and moving tasks because packaged_task is move-only. Demonstrates a task-composition library that returns futures from when_any/when_all-style combinators, works for building work trees, and highlights the missing shared/reenterable equivalent.
AI-written summary · about
related talks
01h 27mManage Asynchronous Control Flow With C++ Coroutines
01h 28mThere Is A Better Future
01h 23mImplementing a C++ Coroutine Task from Scratch
50mC++ Parallel Programming Models
01h 08mBetter Code: Concurrency
55mElegant Asynchronous Code
01h 02mFunctional C++
01h 38mZero-allocation & no type erasure futures
