Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
thread_safe.h File Reference

Declarations for thread-safe data structures. More...

#include <array>
#include <atomic>
#include <condition_variable>
#include <functional>
#include <map>
#include <mutex>
#include <vector>
#include "utility.h"
Include dependency graph for thread_safe.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  safe::event_t< T >
class  safe::alarm_raw_t< T >
class  safe::queue_t< T >
class  safe::shared_t< T >
struct  safe::shared_t< T >::ptr_t
class  safe::post_t< T >
class  safe::mail_raw_t

Typedefs

template<class T>
using safe::alarm_t = std::shared_ptr<alarm_raw_t<T>>
using safe::signal_t = event_t<bool>
using safe::mail_t = std::shared_ptr<mail_raw_t>

Functions

template<class T>
alarm_t< T > safe::make_alarm ()
template<class T, class F_Construct, class F_Destruct>
auto safe::make_shared (F_Construct &&fc, F_Destruct &&fd)
void safe::cleanup (mail_raw_t *)
template<class T>
auto safe::lock (const std::weak_ptr< void > &wp)

Detailed Description

Declarations for thread-safe data structures.

Definition in file thread_safe.h.

Typedef Documentation

◆ alarm_t

template<class T>
using safe::alarm_t = std::shared_ptr<alarm_raw_t<T>>

Definition at line 245 of file thread_safe.h.

◆ mail_t

using safe::mail_t = std::shared_ptr<mail_raw_t>

Definition at line 482 of file thread_safe.h.

◆ signal_t

using safe::signal_t = event_t<bool>

Definition at line 479 of file thread_safe.h.

Function Documentation

◆ cleanup()

void safe::cleanup ( mail_raw_t * mail)
inline

Definition at line 564 of file thread_safe.h.

◆ lock()

template<class T>
auto safe::lock ( const std::weak_ptr< void > & wp)
inline

Definition at line 503 of file thread_safe.h.

◆ make_alarm()

template<class T>
alarm_t< T > safe::make_alarm ( )

Definition at line 248 of file thread_safe.h.

◆ make_shared()

template<class T, class F_Construct, class F_Destruct>
auto safe::make_shared ( F_Construct && fc,
F_Destruct && fd )

Definition at line 472 of file thread_safe.h.