Sunshine master
Self-hosted game stream host for Moonlight.
safe::post_t< T > Class Template Reference

Wrapper that posts cleanup work to a mailbox when destroyed. More...

#include <src/thread_safe.h>

Inheritance diagram for safe::post_t< T >:
[legend]
Collaboration diagram for safe::post_t< T >:
[legend]

Public Member Functions

template<class... Args>
 post_t (mail_t mail, Args &&...args)
 Construct a message-posting wrapper around an existing type.
 

Public Attributes

mail_t mail
 Mailbox kept alive until the posted object is destroyed.
 

Detailed Description

template<class T>
class safe::post_t< T >

Wrapper that posts cleanup work to a mailbox when destroyed.

Constructor & Destructor Documentation

◆ post_t()

template<class T >
template<class... Args>
safe::post_t< T >::post_t ( mail_t mail,
Args &&... args )
inline

Construct a message-posting wrapper around an existing type.

Parameters
mailMailbox used to exchange messages with worker threads.
argsArguments forwarded to the wrapped type constructor.

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