Denis Blank
9593ba120c
Add a quick tour to the readme
4.0.0
2020-04-06 17:36:42 +02:00
Denis Blank
33bfc490ef
Rename cancel() to stop() and make cancel() return a cancellation result instead
2020-04-05 00:49:57 +02:00
Denis Blank
77faf3120f
4.0.0 estimated changelog
2020-04-05 00:15:35 +02:00
Denis Blank
26cd377831
4.0 version increase
2020-04-04 23:35:02 +02:00
Denis Blank
923843cd44
Update function2
2020-04-04 23:32:36 +02:00
Denis Blank
8c1a79d17b
Update the copyright year
2020-04-04 23:31:20 +02:00
Denis Blank
5fbc9c4a59
Some doc fixes
2020-04-04 23:27:32 +02:00
Denis Blank
adc75655f4
Adapt the required boost versions for the async initiate
...
* Also respect asio and boost major versions
2020-04-04 23:08:04 +02:00
Denis Blank
1e39bd85dd
Replace the result<...> implementation by a lighter one
...
* 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
2020-04-04 22:26:09 +02:00
Denis Blank
5f8b2aa317
Fix example code in the tutorial documentation
...
* Closes #30
2020-04-04 21:57:38 +02:00
Denis Blank
37359dec0b
Fix infinite recursion on Clang if the compiler attempts to continue on best effort
...
* 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
2020-04-04 19:41:57 +02:00
Denis Blank
2c76e6c367
Split the async tests into their own test case
2020-04-04 17:19:44 +02:00
Denis Blank
0fb66a7eec
Fix the ci build when exceptions are disabled
2020-04-04 03:02:05 +02:00
Denis Blank
c69385be5f
Implement the wait transforms tests
2020-04-04 01:51:02 +02:00
Denis Blank
ab9669fa2a
Implement wait, wait_for and wait_until transforms properly
...
* 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.
2020-04-04 01:11:27 +02:00
Denis Blank
df4d6ed971
Start to revise transforms
2020-04-04 00:04:51 +02:00
Denis Blank
957d3fa375
Align the cancel behaviour of result to the one used in the unhandled exception handler
...
* 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.
2020-04-03 22:34:08 +02:00
Denis Blank
c8c4325b5b
Fix the unit tests by providing an ASSERT_ASYNC_CANCELLATION
2020-04-03 19:57:46 +02:00
Denis Blank
f1e9255eb9
Fix the test header includes
2020-04-03 19:47:42 +02:00
Denis Blank
85c0d76c7c
Make make_cancelling_continuable throw an default constructed exception_t
...
* This behaviour now aligns on how cancellation is handled in the
unhandled exception handler
2020-04-03 19:44:49 +02:00
Denis Blank
ca26bbbc87
Remap asio::error::basic_errors::operation_aborted to a default constructed exception_t
...
* Add a successful wait on the asio async timer
* Closes #27
* Closes #28
2020-04-03 19:38:13 +02:00
Denis Blank
564d134c75
Improve the clang-tidy and clang-format config
2020-04-03 18:13:41 +02:00
Denis Blank
f7e00bcc8d
Store std::exception::what() automatically before calling TRAP on unhandled exceptions
...
* Makes it easier to inspect the message in debuggers
2020-04-03 17:44:40 +02:00
Denis Blank
89031d932c
Rename cti::asio_token to cti::use_continuable
...
* support -> external
2020-04-03 17:25:52 +02:00
Christos Stratopoulos
1a1c7b68c6
Base implementation of an ASIO completion token integration
...
* Bump the asio version to 1.41
* Move headers that require an external dependency to include/continuable/support
* Ref #28
* Ref #27
2020-04-03 14:44:34 +02:00
Denis Blank
0b1b284e3a
Add continuable_base::is_ready and continuable_base::unpack.
...
* 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.
2019-12-26 10:13:20 +01:00
Denis Blank
117a716de1
Test the class which represents exception_t against true before running unhandled exception handlers.
...
* 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.
2019-11-16 17:13:23 +01:00
Denis Blank
cacb84371a
Add MSVC 16 to the CI
2019-09-28 17:37:01 +02:00
Denis Blank
92d8bbad36
Fix the MSVC 16 build
2019-09-28 17:29:30 +02:00
Denis Blank
0afdbec2cc
Upgrade the dependencies
2019-09-28 16:25:09 +02:00
Denis Blank
ffb3db7089
Fix the asio example
...
* Attempt to fix the GCC warning in a different way
2019-09-02 01:03:28 +02:00
Denis Blank
7aff2c0d9b
Show the submodule revisions in Travis CI
2019-09-02 00:52:30 +02:00
Denis Blank
959f059a25
Fix a build error
2019-09-02 00:45:53 +02:00
Denis Blank
91d51e6543
Attempt to fix the clang/GCC build
2019-09-02 00:37:37 +02:00
Denis Blank
5e8bbe7c72
Use TYPED_TEST_SUITE instead of deprecated GTest TYPED_TEST_CASE
2019-09-02 00:24:07 +02:00
Denis Blank
dce0fbcffe
Clean the playground since the test was moved into the unit tests
2019-09-02 00:17:17 +02:00
Denis Blank
a2fdfdfceb
Use a promise<> for work rather than a dedicated work_base
2019-09-02 00:01:26 +02:00
Denis Blank
389002e918
Improve the work wrapper
2019-09-01 23:47:59 +02:00
Denis Blank
92368bccb7
Update submodules
2019-08-31 03:31:25 +02:00
Denis Blank
e09d26f3c6
First work on passing an exception to the executable work
...
* Make work r-value callable only by default
2019-08-31 03:30:03 +02:00
Denis Blank
422b6138cd
Lift control flow compiler intrinsics into the used scope
...
* Also make UNREACHABLE trap in debug mode
2019-08-27 04:01:37 +02:00
Bogdan Vaneev
42af23fa03
Remove ccache
...
Signed-off-by: Bogdan Vaneev <warchantua@gmail.com>
2019-05-24 17:39:48 +02:00
Bogdan Vaneev
bcf55e88dd
Add ccache
...
Signed-off-by: Bogdan Vaneev <warchantua@gmail.com>
2019-05-24 17:39:48 +02:00
Bogdan Vaneev
88fbcdbc17
Add ccache, add travis cache
...
Signed-off-by: Bogdan Vaneev <warchantua@gmail.com>
2019-05-24 17:39:48 +02:00
Bogdan Vaneev
c9d0e871cd
Bump asio to 1.13.0
...
Signed-off-by: Bogdan Vaneev <warchantua@gmail.com>
2019-05-24 02:33:31 +02:00
Bogdan Vaneev
4cc7523380
Add regex to match AppleClang compiler
...
Signed-off-by: Bogdan Vaneev <warchantua@gmail.com>
2019-05-24 02:33:14 +02:00
Denis Blank
d842c14268
Re-enable the converting constructor of continuable_base
...
* Probably a forgotten leftover from debugging
mainly responsible for more efficient conversions only.
2019-03-19 17:06:58 +01:00
Denis Blank
e9be3eb8c3
Improved the coroutine support auto detection on MSVC
...
* Based on _RESUMABLE_FUNCTIONS_SUPPORTED inspired from asio.
2019-03-15 17:11:38 +01:00
Denis Blank
67d77808dc
Fix the GCC build after bc4d69735
2019-03-12 14:44:15 +01:00
Denis Blank
03ae1b5c45
Update function2 to Naios/function2@e3695b4
2019-03-12 14:43:50 +01:00