This event has been ended!

Background tasks: Resource management and cancellation

Event by: Prague C++

Location: ICT Pro s.r.o., Líbalova 1, Praha 11

Online event

Talks & discussions

About event

Presenter: Andrey Davydov

This talk is about the analysis of one problem that is often encountered in practice — the removal of a heavy operation from a UI thread. Of course, the problem is not new or even unique to C ++. But unlike languages with garbage collection in C++ it requires a nontrivial effort to ensure that the resources used by the background task live long enough. The obvious solution is to use shared_ptr everywhere, but sometimes you need something subtler (and more efficient).
Another nontrivial part of working with background operations is the implementation of cancellation. And of course, since we are talking about C++, both working with resources and support for cancellation should be as efficient as possible, with a minimum of allocations and mutexes.
We will take a look at how it all can be written one by one, with three main mechanisms of asynchronous programming: callbacks, (self-written) futures, and C++ 20 coroutines, which are each of the tradeoffs approaches. At the end of the talk, we'll touch on the fashionable concept of Structured Concurrency.

While you wait why not join our **[discord server](https://discord.gg/EPMXNGuHXG)**

For those that want to join online here is the **[zoom link](https://us06web.zoom.us/j/83877837341?pwd=CdzOMTndZG8wAz9ZCKCpGvTFdxU8vb.1)**

Timetable:

\- 18:00 Get together\, socialize
\- 18:30 talks starts
\- ??:?? talk ends\, more socializing

Original event source

Events in Prague today · Events in Prague this weekend

Loading…