NumericAL
A header-only C++20 lexer built on REAL
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
numerical::detail::worker_bell Struct Reference

A worker's own wake-up: its core, whether it sleeps, and what wakes it. More...

#include <parallel.hpp>

Public Member Functions

 worker_bell (std::size_t on)
 

Public Attributes

const std::size_t core
 The core it is pinned to, or no_core.
 
std::atomic< bool > asleep {false}
 Set before it checks for a run and sleeps.
 
std::mutex lock
 Orders a ring against its sleep.
 
std::condition_variable rung
 Signalled when a run that wants it starts.
 

Detailed Description

A worker's own wake-up: its core, whether it sleeps, and what wakes it.

Definition at line 278 of file parallel.hpp.

Constructor & Destructor Documentation

◆ worker_bell()

numerical::detail::worker_bell::worker_bell ( std::size_t  on)
inlineexplicit

Definition at line 280 of file parallel.hpp.

Member Data Documentation

◆ asleep

std::atomic<bool> numerical::detail::worker_bell::asleep {false}

Set before it checks for a run and sleeps.

Definition at line 284 of file parallel.hpp.

◆ core

const std::size_t numerical::detail::worker_bell::core

The core it is pinned to, or no_core.

Definition at line 283 of file parallel.hpp.

◆ lock

std::mutex numerical::detail::worker_bell::lock

Orders a ring against its sleep.

Definition at line 285 of file parallel.hpp.

◆ rung

std::condition_variable numerical::detail::worker_bell::rung

Signalled when a run that wants it starts.

Definition at line 286 of file parallel.hpp.


The documentation for this struct was generated from the following file: