Denis Blank
f1e9255eb9
Fix the test header includes
2020-04-03 19:47:42 +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
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
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
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
67d77808dc
Fix the GCC build after bc4d69735
2019-03-12 14:44:15 +01:00
Denis Blank
bc4d69735c
Improve cti::split and make it workable with plain callbacks
2019-03-11 16:39:35 +01:00
Denis Blank
daa2fdd686
Implement cti::split which makes it possible to resolve multiple
...
asynchronous control flows from a single promise.
2019-03-08 22:06:44 +01:00
Denis Blank
6b4f6de10f
Use the work erased type directly in release builds
...
* So this behaviour aligns to the one used in continuable_base and promise_base.
2019-03-08 18:27:57 +01:00
Denis Blank
fdd9a061c4
Make promise_base default constructible
...
* This makes it possible to use promise_base for optional
promises directly rather than wrapping it as optional<promise_base<...>>.
* Invalidate the promise_base after its first usage.
* Expose an `operator bool()` to make the validility accessible.
* Remove the no longer needed private promise_no_init_arg_t tag.
2019-03-08 18:13:40 +01:00
Denis Blank
d72e1bfb86
Implement async_on for asynchronous execution on a specific executor
...
* Makes it possible to specify an executor in addition to
the arguments passed to async.
* The reason why async should not support this directly is
that it should be closely modelled to std::async.
2019-01-26 03:46:39 +01:00
Denis Blank
20cd0191fc
For loops provide loop_result loop_break and loop_continue for better readability
2019-01-14 23:13:23 +01:00
Denis Blank
b86fe7a255
Additional work on async
2019-01-13 19:10:55 +01:00
Denis Blank
ac175b4e57
Start to implement the unit tests for loop and add range_loop
2019-01-13 18:19:49 +01:00
Denis Blank
135ebfccf3
Start to implement loop and async
2019-01-13 17:05:28 +01:00
Denis Blank
20e8c7d3e3
Reflow the license text
...
* For some reason some spaces were removed,
the license text and content stays the same.
2019-01-04 13:39:46 +01:00
Denis Blank
a3a9695174
Happy new year!
2019-01-04 13:35:44 +01:00
Denis Blank
c066940d8d
Use new types instead of aliases for type erasures
...
* Makes compiler output much more readable
This is configurateable through CONTINUABLE_WITH_IMMEDIATE_TYPES,
and automatically enabled for debug builds but disabled
for release builds.
* Remove the old continuable-trait.hpp header
* Make the signature of continuable not dependent anymore
on any size of the arguments which fixes the compilation
with forward declared types.
Thanks Rogiel for the correspoding bug report.
Closes #11
2019-01-04 13:12:48 +01:00
Denis Blank
a099c504e1
Workaround for a MSVC required symbol link bug
2018-12-26 06:20:48 +01:00
Denis Blank
7a10363dce
Implement continuable_base<...>::as
...
* Can convert continuables to other compatible signatures
2018-12-26 05:38:10 +01:00
Denis Blank
30f0dca27f
Fix a unit test introduced in 4127c02c3f6d
2018-12-25 11:15:06 +01:00
Denis Blank
f469b7058a
Implement make_cancelling_continuable()
...
* Can be used to cancel the chain when being inside a handler
2018-12-25 09:30:23 +01:00
Denis Blank
4127c02c3f
Add an overload to make_result which accepts a exception_arg_t and exception_t
...
* Can be used to forward the result correctly from next handlers
2018-12-25 09:05:51 +01:00
Denis Blank
57bb43138b
Fix a recursive template instantiation issue on clang and gcc
2018-12-10 05:08:39 +01:00
Denis Blank
1320c8eb63
Add a unit test which tests for ready continuables explicitly
2018-12-09 17:01:56 +01:00
Denis Blank
7352cbf8a9
Make it possible to continue with a continuable from failure handlers
2018-11-30 02:10:05 +01:00
Denis Blank
70c716bb28
Make the failure handler partial applyable
...
* Make result C++17 destructible
* Add unit tests
2018-11-28 01:29:36 +01:00
Denis Blank
f1f9d61952
Attempt to remove the plain handler
2018-11-27 02:39:41 +01:00
Denis Blank
b77e926c41
Fix the unit tests
2018-11-26 04:37:48 +01:00
Denis Blank
a9375c7f22
Implement the exception invokers which fully implements recover, rethrow and cancel now
2018-11-26 04:12:17 +01:00
Denis Blank
82dd47b463
Cleanup the unit tests
2018-11-26 03:21:01 +01:00
Denis Blank
c5663bf1ad
Add the unit tests for the failure handlers recovering and rethrowing
2018-11-26 03:02:49 +01:00
Denis Blank
ba9ff9fce0
Initial work on routing the arguments correctly when using result<...>
2018-11-26 00:41:15 +01:00
Denis Blank
67964b0793
Attempt to fix the clang build
2018-11-25 20:43:14 +01:00
Denis Blank
cd367b3d43
Make result<> return void when calling get_value()
2018-11-25 19:56:03 +01:00
Denis Blank
5354d3512e
Fix the MSVC/Clang build even more
2018-11-25 18:01:15 +01:00
Denis Blank
2a80649084
Make exception and empty results returning a void hint
2018-11-25 17:14:23 +01:00
Denis Blank
782e1c6447
Fix the MSVC build
2018-11-25 17:08:01 +01:00
Denis Blank
f4268f60f9
initial work on the multipathing unit tests
2018-11-25 03:18:35 +01:00
Denis Blank
ffa3b9ee1b
Rename cti::expected -> cti::result
2018-11-25 02:23:08 +01:00
Denis Blank
93b1d27b07
Fix the build for the expected class
2018-11-25 02:13:01 +01:00
Denis Blank
867ab38b8e
Rework the expected_trait
...
* Add tests for the new expected public interface
2018-11-25 00:29:00 +01:00
Denis Blank
057fb37123
Introduce the continuable primitive header which supplies tags
...
* Adapts the new naming scheme from the "Unified Futures" proposal
* Provides new tags for the future inplace resolution
2018-11-19 23:59:01 +01:00