List initialization of unsafe_locker class resulted in a compiler
error, because 1) it had no constructor matching the arguments, and
2) it had user-declared constructors, so aggregate initialization
was not allowed.
This change fixes the issue by adding an appropriate constructor.
* The definition CONTINUABLE_HAS_COROUTINE now indicates support for coroutines,
while CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE is added if the experimental version is used.
* Throws a await_canceled_exception now which automatically gets
converted to a default exception type again if it becomes unhandled in the handler.
* Ref #32
* result<...> only moveable now, the conditional copy capabilities were removed
* If you require the optional copy capability use a std::variant implementation of your choice
* Closes#13
* The library triggers a static_assert correctly if a callable
can't be called with a subset of its arguments but it seems like this is
not enough to make the compiler stop causing the generation
of a 0 - 1 -> std::size_t::max length index sequence which obviously
causes infinite work.
* Reproducible with:
```
cti::make_continuable<std::string>([](cti::promise<std::string> promise) {
promise.set_value("hello");
}).then([](int num) {
//
});
```
* Closes#21
* wait is implemented by a atomic and default condition variable.
* wait_for and wait_until are expensive since we can't assume
anything about the environment thus we have to allocate
a persistent frame.
* Introduce cancellation_result to represent a cancelled async task
* Add cancellation unit tests
* This doesn't allow cancellation of continuables, it is meant
for treating the special state action canceled on the receiver side.
Cancellation of a chain is still up to the user.
* Can be used to specialize the asynchronous control flow
on immediate available asynchronous results mostly returned by:
- make_ready_continuable
- make_exceptional_continuable
* Usable to avoid longer unnecessary synchronous callback nestings.
* cti::query_arg_t was renamed into cti::unpack_arg_t.
* The continuation overload nowreturns result<Args...> rather
than std::tuple<Args...>.
* Add is_ready optimizations to make_exceptional_continuable.
* This allows cheap cancellation of the control flow by passing
a default constructed `exception_t` object to `set_exception`.
* Since possible representatives like
- `std::exception_ptr`
- `std::error_code`
- `std::error_condition`
can be default constructed we have to test them anyway before possibly
rethrowing them.