Denis Blank
ed8310e345
Year and version update
2022-01-20 08:41:32 +01:00
Denis Blank
01f9dbd1f4
Add support for stable coroutines (/await:strict and -fcoroutines)
...
* The definition CONTINUABLE_HAS_COROUTINE now indicates support for coroutines,
while CONTINUABLE_HAS_EXPERIMENTAL_COROUTINE is added if the experimental version is used.
2022-01-20 08:41:32 +01:00
Denis Blank
e2b5fc36fe
Add continuable::via to change the invocation chain to the given executor
2021-10-20 07:41:01 +02:00
Denis Blank
5f84de0e86
Handle the cancellation of continuables used in co_await expression correctly
...
* 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
2020-04-09 15:34:11 +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
8c1a79d17b
Update the copyright year
2020-04-04 23:31:20 +02:00
Denis Blank
2c76e6c367
Split the async tests into their own test case
2020-04-04 17:19:44 +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
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
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
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
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
7a10363dce
Implement continuable_base<...>::as
...
* Can convert continuables to other compatible signatures
2018-12-26 05:38:10 +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
57bb43138b
Fix a recursive template instantiation issue on clang and gcc
2018-12-10 05:08:39 +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
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
cd367b3d43
Make result<> return void when calling get_value()
2018-11-25 19:56:03 +01:00
Denis Blank
f4268f60f9
initial work on the multipathing unit tests
2018-11-25 03:18:35 +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
Denis Blank
6cd39a2e54
Remove a useless unit test
2018-11-19 19:36:57 +01:00
Denis Blank
be6571091b
Implement continuables as return types for coroutines
...
* Closes #4
2018-03-14 10:29:45 +01:00
Denis Blank
f091cbb079
Use a std::apply style unpack
...
* Some cleanup
2018-03-14 10:29:44 +01:00
Denis Blank
b26e9b5289
Split the seq tests
2018-03-12 08:49:08 +01:00
Denis Blank
a3e995c0ce
Improve order dependence for the coroutine detection
2018-03-12 07:24:04 +01:00
Denis Blank
b5571c5ee1
Convert the seq and all tests into typed tests
...
* Hopefully this fixes the GCC virtual memory errors
2018-03-12 06:55:51 +01:00
Denis Blank
de40af0927
Add cti::populate and make use of it in tests
2018-03-09 09:45:00 +01:00
Denis Blank
86c3815ae0
Make continuable_base non copyable by default
...
* Actually there is no reason that the call hierarchy is copyable
when looking at the fact that two types just cause distraction
and bad usage.
2018-03-09 08:51:33 +01:00
Denis Blank
7a00a5f1c2
Seems like move only values inside initializer lists aren't valid sometimes
2018-03-09 08:41:55 +01:00
Denis Blank
1ce251483c
Add more remaining nested unit tests to the any strategy
2018-03-09 08:13:50 +01:00
Denis Blank
deb798118c
Add unit tests for the nested seq and all compositions
2018-03-09 05:40:37 +01:00
Denis Blank
b50c2bf8a8
Fix non default constructible values in compositions
...
* Add a test case for the non default constructible case
2018-03-09 05:25:36 +01:00