\


 Wednesday, 03 June 2020
RStein.AsyncCpp (06-03-2020) - C++ Task Parallel Library

https://github.com/renestein/Rstein.AsyncCpp

Changes:

- Added AsyncMutex synchronization primitive.

https://github.com/renestein/Rstein.AsyncCpp#AsyncMutex

- TaskFactory.Run automatically unwraps nested Task (e.g. scheduled lambda-coroutine returns Task). Very convenient and prevents some hard-to-debug, but easy to introduce bugs in C++ coroutines.

https://github.com/renestein/Rstein.AsyncCpp#TaskFactory-Unwrap-Nested-Task

- Task has the Unwrap method ((Unwrap Task<Task<T> and returns Task<T>) and corresponding Fjoin method.

https://github.com/renestein/Rstein.AsyncCpp#Task-Fjoin

- Added SynchronizationContext - provides a mechanism to queue work to a specialized context. (useful for marshaling calls to UI thread, event loop, etc.)

https://github.com/renestein/Rstein.AsyncCpp#synchronizationcontext

- Added SynchronizationContextScope - RAII class for SynchronizationContext. An instance of this class captures the current synchronization context in the constructor (now 'old' context), installs new synchronization context provided by the user, and restores 'old' synchronization context in the destructor.)

https://github.com/renestein/Rstein.AsyncCpp#SynchronizationContextScope

- Added ConfigureAwait method (for the Task awaiter) - configures if the 'co_await continuation' is resumed in the specific synchronization context.

https://github.com/renestein/Rstein.AsyncCpp#ConfigureAwait

- Added GlobalTaskSettings::UseOnlyConfigureAwaitFalseBehavior configuration key - set the key to true if you want to enforce the equivalent of the 'co_await someTask.ConfigureAwait(false)' for all 'co_await someTask{anything}' expressions in the application - synchronization context is then never used when resuming the 'co_await continuation'.

https://github.com/renestein/Rstein.AsyncCpp#GlobalTaskSettings-UseOnlyConfigureAwaitFalseBehavior

- Task.ContinueWith method has new overloads with CancellationToken argument.



Wednesday, 03 June 2020 10:43:27 (Central Europe Standard Time, UTC+01:00)       
Comments [0]  C++ | Nativní kód


Comments are closed.