Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/cppcoro/cancellation_source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ namespace cppcoro
/// A cancellation source object will not be cancellable if it has
/// previously been moved into another cancellation_source instance
/// or was copied from a cancellation_source that was not cancellable.
bool can_be_cancelled() const noexcept;
[[nodiscard]] bool can_be_cancelled() const noexcept;

/// Obtain a cancellation token that can be used to query if
/// cancellation has been requested on this source.
///
/// The cancellation token can be passed into functions that you
/// may want to later be able to request cancellation.
cancellation_token token() const noexcept;
[[nodiscard]] cancellation_token token() const noexcept;

/// Request cancellation of operations that were passed an associated
/// cancellation token.
Expand All @@ -59,7 +59,7 @@ namespace cppcoro

/// Query if some thread has called 'request_cancellation()' on this
/// cancellation_source.
bool is_cancellation_requested() const noexcept;
[[nodiscard]] bool is_cancellation_requested() const noexcept;

private:

Expand Down
Loading