KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ACE_ENGINE_OP Struct Reference

One caller operation's claim on the Access engine lock. More...

#include <ace_backend.h>

Public Types

enum class  STATE { IDLE , WAITING , ACQUIRED , EXPIRED }
 
using CLOCK = std::chrono::steady_clock
 

Public Member Functions

 ACE_ENGINE_OP (CLOCK::time_point aDeadline)
 
bool Busy () const
 True if the operation is waiting for the engine lock or gave up on it.
 

Public Attributes

const CLOCK::time_point deadline
 
std::atomic< STATE > state { STATE::IDLE }
 

Detailed Description

One caller operation's claim on the Access engine lock.

The deadline is fixed when the operation starts, and every job the operation submits, including the worker's exit hook after it, waits for the lock no longer than that. The state is the operation's own, so a worker abandoned by an earlier operation never touches a later one.

Definition at line 43 of file ace_backend.h.

Member Typedef Documentation

◆ CLOCK

using ACE_ENGINE_OP::CLOCK = std::chrono::steady_clock

Definition at line 45 of file ace_backend.h.

Member Enumeration Documentation

◆ STATE

enum class ACE_ENGINE_OP::STATE
strong
Enumerator
IDLE 
WAITING 

A job is blocked on the engine lock.

ACQUIRED 

The job took the lock.

EXPIRED 

The deadline passed first; never cleared.

Definition at line 47 of file ace_backend.h.

Constructor & Destructor Documentation

◆ ACE_ENGINE_OP()

ACE_ENGINE_OP::ACE_ENGINE_OP ( CLOCK::time_point aDeadline)
inlineexplicit

Definition at line 55 of file ace_backend.h.

References deadline.

Member Function Documentation

◆ Busy()

bool ACE_ENGINE_OP::Busy ( ) const
inline

True if the operation is waiting for the engine lock or gave up on it.

Definition at line 61 of file ace_backend.h.

References EXPIRED, state, and WAITING.

Member Data Documentation

◆ deadline

const CLOCK::time_point ACE_ENGINE_OP::deadline

Definition at line 67 of file ace_backend.h.

Referenced by ACE_ENGINE_OP().

◆ state

std::atomic<STATE> ACE_ENGINE_OP::state { STATE::IDLE }

Definition at line 68 of file ace_backend.h.

Referenced by Busy().


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