libunifex icon indicating copy to clipboard operation
libunifex copied to clipboard

add co_file_copy example

Open kirkshoop opened this issue 4 years ago • 1 comments

This is just like the file_copy example, but uses the compilers implementation of C++20 coroutines to compose the senders and manage the lifetimes of variables.

The result is much fewer lines of code and a more intuitive code organization. The tradeoff is less control over how many allocations there are.

kirkshoop avatar Sep 24 '21 21:09 kirkshoop

This should not be merged yet. This is expected to fail CI. There are changes needed to the build system to support coroutines, with clang on unix at least.. This example manually forces coroutines on and I do not expect that to work.

kirkshoop avatar Sep 24 '21 21:09 kirkshoop