mp-coro icon indicating copy to clipboard operation
mp-coro copied to clipboard

cancellation implementation (minus integration with build system)

Open juarez-gonza opened this issue 2 years ago • 0 comments

Hey. This is a bundle of a couple of commits with an implementation for cancellation tokens and callback registration.

This has a similar structure to that of cancellation tokens in cppcoro or folly.

Things contained in this pull request:

  • cancellation tokens and cancellation_source
  • support for registering callbacks on cancellation through cancellation_registration and a data structure cancellation_registry.
  • some source files. In the design there is an inherent cyclic dependency between cancellation_registration, cancellation_registry, and cancellation_state, that was unavoidable using only header files.
  • changes to src/CMakeLists.txt Since it is no longer a header only library, some properties do not have INTERFACE scope anymore (but my cmake-foo is limited so maybe there's a better approach).

juarez-gonza avatar Jun 29 '23 12:06 juarez-gonza