NVIDIA / NVIDIA/stdexec

inplace_stop_token::request_stop() returns an inverted value

Open
#1,419 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.4k
Forks
270
Avg merge
3d 6h
Merged PRs (30d)
39

Description

The specification for a stop-source requires that the request_stop() method returns true if a stop-request was made and false if a stop-request could not be made (e.g. because a stop-request had already been made).

However, the current implementation of stdexec::inplace_stop_source::request_stop() as the result inverted.
It returns false if a stop-request was made and true if a stop-request was not made.

See: https://github.com/NVIDIA/stdexec/blob/519f931ef9d44ca6cc8b2c8a3b3cb760a3523d4f/include/stdexec/stop_token.hpp#L248-L275

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in include/stdexec/stop_token.hpp at lines 248-275 and inspect the return logic of stdexec::inplace_stop_source::request_stop(). Confirm that its result matches the specified true/false behavior for making a new stop request versus an already-requested source; done when the implementation returns the documented value.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.