Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
CallQueue Class Reference

#include "lib/call-queue.hpp"

Description

A threadsafe queue for bound void(void) functors.

Typically used to dispatch function invocations together with their concrete parameters into another thread for invocation.

Definition at line 49 of file call-queue.hpp.

Public Types

using Operation = std::function< void(void)>
 

Public Member Functions

 CallQueue ()
 
CallQueuefeed (Operation &&op)
 
CallQueueinvoke ()
 
size_t size () const
 
bool empty () const
 

Private Attributes

lib::IterQueue< Operationqueue_
 

Additional Inherited Members

- Static Public Member Functions inherited from Sync< CONF >
static MonitorgetMonitor (Sync const *forThis)
 
- Private Member Functions inherited from NonCopyable
 ~NonCopyable ()=default
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Constructor & Destructor Documentation

◆ CallQueue()

CallQueue ( )
inline

Definition at line 60 of file call-queue.hpp.

Member Typedef Documentation

◆ Operation

using Operation = std::function<void(void)>

Definition at line 54 of file call-queue.hpp.

Member Function Documentation

◆ feed()

CallQueue & feed ( Operation &&  op)
inline

Definition at line 64 of file call-queue.hpp.

References IterQueue< TY >::feed(), and CallQueue::queue_.

Referenced by CallQueue_test::Worker::Worker(), UiDispatcher::event(), BusTerm_test::pushDiff(), CallQueue_test::verify_Consistency(), and CallQueue_test::verify_SimpleUse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ invoke()

CallQueue & invoke ( )
inline

Definition at line 77 of file call-queue.hpp.

References CallQueue::empty(), and CallQueue::queue_.

Referenced by UiDispatcher::UiDispatcher(), CallQueue_test::Worker::Worker(), BusTerm_test::pushDiff(), CallQueue_test::verify_Consistency(), and CallQueue_test::verify_SimpleUse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ size()

size_t size ( ) const
inline

Definition at line 97 of file call-queue.hpp.

References CallQueue::queue_, and IterQueue< TY >::size().

Referenced by CallQueue::empty(), and CallQueue_test::verify_SimpleUse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ empty()

bool empty ( ) const
inline

Definition at line 104 of file call-queue.hpp.

References CallQueue::size().

Referenced by CallQueue::invoke().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ queue_

lib::IterQueue<Operation> queue_
private

Definition at line 57 of file call-queue.hpp.

Referenced by CallQueue::feed(), CallQueue::invoke(), and CallQueue::size().

+ Inheritance diagram for CallQueue:
+ Collaboration diagram for CallQueue:

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