Coroutines and Structured Concurrency in Practicecoroutines A lot of existing code mostly callback-based A custom-built I/O event loop predates Asio by a decade fine-tuned for specific use cases Somewhat conservative audience real benefit needs std::arraybuf(1024); asio::co_spawn( ex, [&s, &buf]() -> asio::awaitable { co_await s.read_some(s, asio::buffer(buf), asio::use_awaitable); }, asio::detached); } No way to figure out task lifetime => no automatic object lifetime managementDetached tasks considered harmful // don’t 0 码力 | 103 页 | 1.98 MB | 6 月前3
deploying the networking TSto handle query Front-end and back-end communicate with separate protocol Back-end implemented with Asio Queries serviced by proprietary database back-end (written in C++) 4 DataConn TCP protocol without templateauto with_pool(Configuration& config, thread_pool& pool); void thread_start(asio::io_context& ctx); }; 36 template struct connection_state { using query_type = template connection_state(asio::ip::tcp::socket s, asio::ip::tcp::endpoint local, asio::ip::tcp::endpoint remote, Configuration& config, WithPool& with_pool); 0 码力 | 44 页 | 892.77 KB | 6 月前3
THE NETWORKINGTS FROM SCRATCH: IO ObjectsLeahy - rleahy@rleahy.caNetworking TS & Asio ISO C++ Networking is blocked on Executors (P0443) Target for Networking is currently C++23 (P0592) Used standalone Asio (1.18.0) to prepare these slides Using Using the P0443-friendly extensions to the Networking TS shipping in “standalone” Asio & Boost.Asio (P0958) 2async_wait_then_write 3Composed Asynchronous Operations Composing asynchronous operations0 码力 | 35 页 | 900.82 KB | 6 月前3
Session Types in C++in practice • concurrent queues • networking sockets io_context, resolver, acceptor, end_point, asio::buffer, async_read/write, serialization... 54Communication? • Abstraction: channels... or actors in practice • concurrent queues • networking sockets io_context, resolver, acceptor, end_point, asio::buffer, async_read/write, serialization... 55Communication? • Abstraction: channels... or actors0 码力 | 89 页 | 1.55 MB | 6 月前3
failing successfullyneed to be able to stop if one thread encounters an error 30 class thread_pool { struct state : ::asio::io_context { std::thread thread; }; using states_type = std::list; states_type states_; 0 码力 | 44 页 | 625.44 KB | 6 月前3
Back to Basics: Concurrencyprogram is fundamentally multithreaded, look for higher-level facilities: promise/future, coroutines, ASIO, TBB 51Questions? followed by some bonus slidesBonus: C++20 std::atomic_ref● Basically, std::atomic 0 码力 | 58 页 | 333.56 KB | 6 月前3
Things Happening in SG14engine implements by itself • A C++ standard library version would be seen as something useful • Boost ASIO seems “heavy” to most SG14 contributors, but a replacement for C sockets would be a huge win •0 码力 | 148 页 | 1009.97 KB | 6 月前3
Conda 23.3.x Documentationknown software that installs Intel libraries to C:\Windows\System32: • Amplitube, by IK Multimedia • ASIO4ALL, by Michael Tippach If you find others, please let us know. If you're on this list and you want0 码力 | 370 页 | 2.94 MB | 8 月前3
Conda 23.5.x Documentationknown software that installs Intel libraries to C:\Windows\System32: • Amplitube, by IK Multimedia • ASIO4ALL, by Michael Tippach If you find others, please let us know. If you're on this list and you want0 码力 | 370 页 | 3.11 MB | 8 月前3
Conan 1.22 Documentationspecified in the conanfile. The name of the files follow the pattern Find.cmake. So for the asio/1.14.0 package, a Findasio. cmake file will be generated. Variables in Find .cmake Being 0 码力 | 629 页 | 4.98 MB | 1 年前3
共 65 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7













