vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vitrio::completion Class Referenceabstract

A query-only view of whether one or more units of work have finished. More...

#include <vitrio/concurrency/completion.hpp>

Inheritance diagram for vitrio::completion:
Inheritance graph
[legend]

Public Member Functions

 completion (const completion &other)=default
 
 completion (completion &&other)=default
 
completion & operator= (const completion &other)=default
 
completion & operator= (completion &&other)=default
 
virtual void wait () const =0
 Block the calling thread until this is ready.
 
virtual bool is_ready () const noexcept=0
 Whether the work behind this has finished.
 
virtual void get () const =0
 Wait, then rethrow the first exception recorded, if any.
 

Detailed Description

A query-only view of whether one or more units of work have finished.

Carries no way to mark itself done: that belongs to the disjoint completion_notifier, which a caller holding this is never handed.

Member Function Documentation

◆ get()

virtual void vitrio::completion::get ( ) const
pure virtual

Wait, then rethrow the first exception recorded, if any.

Exceptions
Whateverthe first unit of work to fail threw.

Implemented in vitrio::counting_completion.

◆ is_ready()

virtual bool vitrio::completion::is_ready ( ) const
pure virtualnoexcept

Whether the work behind this has finished.

Returns
bool True once every unit of work this stands for has run, successfully or not.

Implemented in vitrio::counting_completion.

◆ wait()

virtual void vitrio::completion::wait ( ) const
pure virtual

Block the calling thread until this is ready.

Implemented in vitrio::counting_completion.


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