---
name: "std::stop_source"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::stop_source"
---

# std::stop\_source(3cxx)

A type that allows a stop request to be made.

## NAME

std::stop\_source - A type that allows a stop request to be made.

## SYNOPSIS

`#include <stop_token>`

### Public Member Functions

**stop\_source** (const **stop\_source** &\_\_other) noexcept\
 **stop\_source** (**std::nostopstate\_t**) noexcept\
 **stop\_source** (**stop\_source** &&) noexcept=**default**\
 **stop\_token** **get\_token** () const noexcept\
 **stop\_source** & **operator=** (const **stop\_source** &\_\_other) noexcept\
 **stop\_source** & **operator=** (**stop\_source** &&) noexcept=**default**\
 bool **request\_stop** () const noexcept\
 bool **stop\_possible** () const noexcept\
 bool **stop\_requested** () const noexcept\
 **void** **swap** (**stop\_source** &\_\_other) noexcept\

### Friends

bool **operator==** (const **stop\_source** &\_\_a, const **stop\_source** &\_\_b) noexcept\
 **void** **swap** (**stop\_source** &**\_\_lhs**, **stop\_source** &**\_\_rhs**) noexcept\

## Detailed Description

A type that allows a stop request to be made.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
