From 0fcfc36ac29aa98560ff936a68d55622c90d1450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kami=C5=84ski?= Date: Mon, 8 Dec 2025 15:26:35 +0100 Subject: [PATCH 1/6] New issue for US 249-379: Move specification for task::stop_token --- xml/issue4485.xml | 64 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 xml/issue4485.xml diff --git a/xml/issue4485.xml b/xml/issue4485.xml new file mode 100644 index 0000000000..05dde0ac4f --- /dev/null +++ b/xml/issue4485.xml @@ -0,0 +1,64 @@ + + + + +Move specification for `task::stop_token_type` +
+Tomasz Kamiński +08 Dec 2025 +99 + + +Addresses US 249-379 +

+It is not clear what bullet p4.6 is – it reads like a requirement on `stop_token_type`, +but if so, this paragraph is a poor place for it. +

+ +
+ + +

+This wording is relative to . +

+ +
    +
  1. Modify as indicated:

    + +
    +

    -5- +`allocator_type` shall meet the Cpp17Allocator requirements. + + For types `Fn` nad `Init` such that both invocable<Fn> and constructible_from<Fn, Init> are modeled, +stop_token_type::callback_type<Fn> shall model stoppable-callback-for<Fn, stop_token_type, Init>. +

    +
    +
  2. + +
  3. Modify as indicated:

    + +
    +void start() & noexcept;
    +
    +
    +

    -4- Effects: Effects: Let prom be the object `handle.promise()`. +Associates STATE(prom), RCVR(prom), and SCHED(prom) with `*this` as follows: +

      +
    • -4.1- […]
    • +
    • -4.2- […]
    • +
    • -4.3- […]
    • +
    +Let `st` be `get_stop_token(get_env(rcvr))`. Initializes prom.token and prom.source such that +
      +
    • -4.4- prom.token.stop_requested() returns st.stop_requested();
    • +
    • -4.5- prom.token.stop_requested() returns st.stop_requested();.
    • +
    • -4.6- for types `Fn` nad `Init` such that both invocable<Fn> and constructible_from<Fn, Init> are modeled, + stop_token_type::callback_type<Fn> modes lstoppable-callback-for<Fn, stop_token_type, Init>.
    • +

    +
    +
  4. + +
+
+ +
From b9af30dc35e67288bc0f48cd3499ebdcd6f10d26 Mon Sep 17 00:00:00 2001 From: tomaszkam Date: Mon, 8 Dec 2025 17:07:36 +0100 Subject: [PATCH 2/6] Update xml/issue4485.xml Co-authored-by: timsong-cpp --- xml/issue4485.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/issue4485.xml b/xml/issue4485.xml index 05dde0ac4f..95bc3e09cf 100644 --- a/xml/issue4485.xml +++ b/xml/issue4485.xml @@ -52,7 +52,7 @@ Let `st` be `get_stop_token(get_env(rcvr))`. Initializes prom.token
  • -4.4- prom.token.stop_requested() returns st.stop_requested();
  • -4.5- prom.token.stop_requested() returns st.stop_requested();.
  • -
  • -4.6- for types `Fn` nad `Init` such that both invocable<Fn> and constructible_from<Fn, Init> are modeled, +
  • -4.6- for types `Fn` and `Init` such that both invocable<Fn> and constructible_from<Fn, Init> are modeled, stop_token_type::callback_type<Fn> modes lstoppable-callback-for<Fn, stop_token_type, Init>.
  • From 47a7137366cec6d2dfa434c98cedb74a3a5c2bd6 Mon Sep 17 00:00:00 2001 From: tomaszkam Date: Mon, 8 Dec 2025 17:07:45 +0100 Subject: [PATCH 3/6] Update xml/issue4485.xml Co-authored-by: timsong-cpp --- xml/issue4485.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/issue4485.xml b/xml/issue4485.xml index 95bc3e09cf..e7e0f51240 100644 --- a/xml/issue4485.xml +++ b/xml/issue4485.xml @@ -53,7 +53,7 @@ Let `st` be `get_stop_token(get_env(rcvr))`. Initializes prom.token-4.4- prom.token.stop_requested() returns st.stop_requested();
  • -4.5- prom.token.stop_requested() returns st.stop_requested();.
  • -4.6- for types `Fn` and `Init` such that both invocable<Fn> and constructible_from<Fn, Init> are modeled, - stop_token_type::callback_type<Fn> modes lstoppable-callback-for<Fn, stop_token_type, Init>.
  • + stop_token_type::callback_type<Fn> models stoppable-callback-for<Fn, stop_token_type, Init>.

    From 1cb6513f6a6ef0a0e4620f4571ffaf157797d805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kami=C5=84ski?= Date: Mon, 8 Dec 2025 17:21:54 +0100 Subject: [PATCH 4/6] Addressed comments from Tim --- xml/issue4485.xml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xml/issue4485.xml b/xml/issue4485.xml index e7e0f51240..6802a26fa9 100644 --- a/xml/issue4485.xml +++ b/xml/issue4485.xml @@ -15,6 +15,10 @@ It is not clear what bullet p4.6 is – it reads like a but if so, this paragraph is a poor place for it.

    +2025-12-05 Tomasz comments +

    The paragraph expresses requirements on user supplied `Environment::stop_source_type`, +that needs to model stoppable-source, which includes stoppable-callback-for +on associated token. We should also require that `Environment::scheduler_type` shall satisfy `scheduler`.

    @@ -27,11 +31,9 @@ This wording is relative to .

    -5- -`allocator_type` shall meet the Cpp17Allocator requirements. - - For types `Fn` nad `Init` such that both invocable<Fn> and constructible_from<Fn, Init> are modeled, -stop_token_type::callback_type<Fn> shall model stoppable-callback-for<Fn, stop_token_type, Init>. -

    +`allocator_type` shall meet the Cpp17Allocator requirements, +`scheduler_type` shall model `scheduler`, and `stop_source_type` shall model stoppable-source. +.

    @@ -51,7 +53,7 @@ Associates STATE(prom), RCVR(prom) Let `st` be `get_stop_token(get_env(rcvr))`. Initializes prom.token and prom.source such that
    • -4.4- prom.token.stop_requested() returns st.stop_requested();
    • -
    • -4.5- prom.token.stop_requested() returns st.stop_requested();.
    • +
    • -4.5- prom.token.stop_possible() returns st.stop_possible();.
    • -4.6- for types `Fn` and `Init` such that both invocable<Fn> and constructible_from<Fn, Init> are modeled, stop_token_type::callback_type<Fn> models stoppable-callback-for<Fn, stop_token_type, Init>.

    From a223d051f18401504cffff570ef16431412ba860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kami=C5=84ski?= Date: Mon, 8 Dec 2025 18:21:06 +0100 Subject: [PATCH 5/6] Clarify that equivalence of returns holds during lifetime of operation --- xml/issue4485.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xml/issue4485.xml b/xml/issue4485.xml index 6802a26fa9..e4325a9225 100644 --- a/xml/issue4485.xml +++ b/xml/issue4485.xml @@ -19,6 +19,9 @@ but if so, this paragraph is a poor place for it.

    The paragraph expresses requirements on user supplied `Environment::stop_source_type`, that needs to model stoppable-source, which includes stoppable-callback-for on associated token. We should also require that `Environment::scheduler_type` shall satisfy `scheduler`.

    + +

    We also need to clarify that `stop_possible` and `stop_requested` on prom.token returns +same value as `st` during lifetime of asynchronous operation.

    @@ -51,6 +54,7 @@ Associates STATE(prom), RCVR(prom)
  • -4.3- […]
  • Let `st` be `get_stop_token(get_env(rcvr))`. Initializes prom.token and prom.source such that +during lifetime of assynchrous operation () associated with `*this`
    • -4.4- prom.token.stop_requested() returns st.stop_requested();
    • -4.5- prom.token.stop_possible() returns st.stop_possible();.
    • From b10e687058426d97bfd1ff6a07500150699f3752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kami=C5=84ski?= Date: Mon, 8 Dec 2025 18:22:54 +0100 Subject: [PATCH 6/6] Added article --- xml/issue4485.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/issue4485.xml b/xml/issue4485.xml index e4325a9225..4312e9eeb1 100644 --- a/xml/issue4485.xml +++ b/xml/issue4485.xml @@ -54,7 +54,7 @@ Associates STATE(prom), RCVR(prom)
    • -4.3- […]
    Let `st` be `get_stop_token(get_env(rcvr))`. Initializes prom.token and prom.source such that -during lifetime of assynchrous operation () associated with `*this` +during lifetime of the assynchrous operation () associated with `*this`
    • -4.4- prom.token.stop_requested() returns st.stop_requested();
    • -4.5- prom.token.stop_possible() returns st.stop_possible();.