569 Commits

Author SHA1 Message Date
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
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
41f3429c85 Remove some using expressions
* Those caused issues in namespaces where symbols were preloaded
* Formatting fixes
2019-03-08 20:18:26 +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
2bc448b905 Link the MeetingC++ talk in the readme 2019-02-26 16:01:20 +01:00
Denis Blank
e23e363b03 Add a conanfile
* Closes #12
2019-01-29 20:28:09 +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
fa589a1e95 Document range_loop 2019-01-14 23:14:29 +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
76ecc3d26d Attempt to fix the build 2019-01-14 21:10:25 +01:00
Denis Blank
7491022d0f Implement make_plain to make it possible to not handle special objects in handlers 2019-01-14 21:02:22 +01:00
Denis Blank
4c807aec75 Update a deprecation message 2019-01-14 18:13:22 +01:00
Denis Blank
60b75a6134 Finish the async implementation 2019-01-14 18:07:37 +01:00
Denis Blank
b86fe7a255 Additional work on async 2019-01-13 19:10:55 +01:00
Denis Blank
a4da3e84ef Fix the range_loop build 2019-01-13 18:52:13 +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
5c1cd87739 Doc improvement 2019-01-06 14:05:54 +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
2d5aa36b67 Update function2 to Naios/function2@d2acdb6 2019-01-04 12:59:25 +01:00
Denis Blank
3bd4dd40de Fixate the args of the final callback
* Also allow to customize it through the
  CONTINUABLE_WITH_CUSTOM_FINAL_CALLBACK define.
  This can be used to implement custom unhandled
  exception handlers and more.
2018-12-29 06:25:49 +01:00