@@ -2739,7 +2739,7 @@ concept returnable = std::is_void_v<T> || std::is_reference_v<T> || std::movable
2739
2739
*/
2740
2740
template <returnable T = void >
2741
2741
struct LF_CORO_ATTRIBUTES task : std::type_identity<T> {
2742
- void *promise ; // /< An opaque handle to the coroutine promise.
2742
+ void *prom ; // /< An opaque handle to the coroutine promise.
2743
2743
};
2744
2744
2745
2745
} // namespace core
@@ -2961,13 +2961,13 @@ concept async_function_object = std::is_object_v<F> && std::copy_constructible<F
2961
2961
* @brief This describes the public-API of the first argument passed to an async function.
2962
2962
*
2963
2963
* An async functions' invocability and return type must be independent of their first argument except for its
2964
- * tag value. A user may query the first argument's static member `tag ` to obtain this value. Additionally, a
2965
- * user may query the first argument's static member function `context()` to obtain a pointer to the current
2964
+ * tag value. A user may query the first argument's static member `tagged ` to obtain this value. Additionally,
2965
+ * a user may query the first argument's static member function `context()` to obtain a pointer to the current
2966
2966
* workers `lf::context`. Finally a user may cache an exception in-flight by calling `.stash_exception()`.
2967
2967
*/
2968
2968
template <typename T>
2969
2969
concept first_arg = async_function_object<T> && requires (T arg) {
2970
- { T::tag } -> std::convertible_to<tag>;
2970
+ { T::tagged } -> std::convertible_to<tag>;
2971
2971
{ T::context () } -> std::same_as<context *>;
2972
2972
{ arg.stash_exception () } noexcept ;
2973
2973
};
@@ -2990,7 +2990,7 @@ namespace impl {
2990
2990
template <quasi_pointer I, tag Tag, async_function_object F, typename ... Cargs>
2991
2991
class first_arg_t {
2992
2992
public:
2993
- static constexpr tag tag = Tag; // /< The way this async function was called.
2993
+ static constexpr tag tagged = Tag; // /< The way this async function was called.
2994
2994
2995
2995
first_arg_t () = default ;
2996
2996
@@ -3552,7 +3552,7 @@ struct promise;
3552
3552
*/
3553
3553
template <returnable R, return_address_for<R> I, tag Tag>
3554
3554
struct [[nodiscard(" A quasi_awaitable MUST be immediately co_awaited!" )]] quasi_awaitable {
3555
- promise<R, I, Tag> *promise ; // /< The parent/semaphore needs to be set!
3555
+ promise<R, I, Tag> *prom ; // /< The parent/semaphore needs to be set!
3556
3556
};
3557
3557
3558
3558
// ---------------------------- //
@@ -3583,7 +3583,7 @@ struct [[nodiscard("A bound function SHOULD be immediately invoked!")]] y_combin
3583
3583
using R = async_result_t <F, Args...>;
3584
3584
using P = promise<R, I, Tag>;
3585
3585
3586
- auto *prom = static_cast <P *>(task.promise );
3586
+ auto *prom = static_cast <P *>(task.prom );
3587
3587
3588
3588
if constexpr (!std::is_void_v<R>) {
3589
3589
prom->set_return (std::move (ret));
@@ -3857,8 +3857,8 @@ auto sync_wait(Sch &&sch, F fun, Args &&...args) -> async_result_t<F, Args...> {
3857
3857
3858
3858
[&]() noexcept {
3859
3859
//
3860
- await.promise ->set_root_notify (¬ifier);
3861
- auto *handle = std::bit_cast<submit_handle>(static_cast <impl::frame *>(await.promise ));
3860
+ await.prom ->set_root_notify (¬ifier);
3861
+ auto *handle = std::bit_cast<submit_handle>(static_cast <impl::frame *>(await.prom ));
3862
3862
3863
3863
impl::ignore_t {} = impl::tls::thread_stack->release ();
3864
3864
@@ -4242,14 +4242,14 @@ struct promise_base : frame {
4242
4242
requires (Tg == tag::call || Tg == tag::fork)
4243
4243
auto await_transform (quasi_awaitable<R2, I2, Tg> awaitable) noexcept {
4244
4244
4245
- awaitable.promise ->set_parent (this );
4245
+ awaitable.prom ->set_parent (this );
4246
4246
4247
4247
if constexpr (Tg == tag::call) {
4248
- return call_awaitable{{}, awaitable.promise };
4248
+ return call_awaitable{{}, awaitable.prom };
4249
4249
}
4250
4250
4251
4251
if constexpr (Tg == tag::fork) {
4252
- return fork_awaitable{{}, awaitable.promise , this };
4252
+ return fork_awaitable{{}, awaitable.prom , this };
4253
4253
}
4254
4254
}
4255
4255
};
0 commit comments