Releases: VestniK/portable_concurrency
Releases · VestniK/portable_concurrency
Version 0.11.0
Version 0.10.1
- Build fix for all gcc versions with same code (including some gcc 9 builds) Closes #14
Version 0.10.0
- Strictier guaranties on user provided function destruction
- Functions are destroyed afeter execution
- Functions are destroyed after task abandon
- Rename unit tests target to make it easier to include library with add_subdirectory
Version 0.9.0
- Documentation improvements.
- Unwrap support for
packaged_task
.packaged_task<future<R>(A...)>
andpackaged_task<shared_future<R>(A...)>
are now allowed.get_future
member function returns unwrapedfuture<R>
/shared_future<R>
respectively. - Better implementation of
pc::async
. Allocation of additional intermediate shared state is removed. Only one shared state is allocated in the current implementation. - Notification on future ready.
future::notify
andshared_future::notify
member function allow to pass custom function object to be called when future becomes ready. - Added
timed_waiter
class which is intended to replacewait_for
/wait_until
member functions offuture
andshared_future
. Those member functions are rarely used but prevent efficient future implementation.wait_for
/wait_until
are deprecates in this release.
Version 0.8.1
- Fixed broken shared_future<void>::next
Version 0.8.0
- Continuation with ability to detect cancelation:
pc::future<int> f = foo();
pc::future<string> = f.then([](pc::promise<string> p, pc::future<int> ready) {...});
This form of continuation can detect if anybody is waiting for the result by calling
p.is_awaiten()
. Heavy tasks might use this mechanism to return earlier if the result
is not needed anymore. - All function returning
future
are marked with compiler specific equivalents of C++17
[[nodiscard]]
when discarding the result cause spawned task cancellation. - Detach in the middle of the continuations chain:
auto future = pc::async(exec, foo).then(bar).detach().then(baz);
destruction of thefuture
object without waiting for the result might cancelbaz
execution
whilefoo
andbar
are guarantied to be executed.