Support Class Library
A set of tools providing classes and utility
Namespaces | Classes | Functions
scl::async Namespace Reference

Base namespace for asynchronous APIs. More...

Namespaces

 details
 

Classes

class  Active
 A class that allow task execution on a separate thread using RAII semantics. More...
 
class  AsyncQueue
 
class  Channel
 A channel to use for asynchronous communication of data in a queued manner. More...
 
class  Mutexed
 A wrapper class that protects a value with a lock. More...
 
struct  with_traits
 Traits for use with the scl::async::with function. More...
 
struct  with_traits< Mutexed< T > >
 
struct  with_traits< std::mutex >
 

Functions

template<class U , class T , class L , template< class > class G, class C >
void operator>> (U &&value, Channel< T, L, G, C > &channel)
 Forward a value into a channel. More...
 
template<class U , class T , class L , template< class > class G, class C >
void operator<< (U &value, Channel< T, L, G, C > &channel)
 Extract a value from the channel. More...
 
template<class Resource , class F >
auto with (Resource &&res, F &&f) -> scl::tools::meta ::return_t< F >
 Execute a transaction in a guarded manner. More...
 

Detailed Description

Base namespace for asynchronous APIs.

Function Documentation

◆ operator<<()

template<class U , class T , class L , template< class > class G, class C >
void scl::async::operator<< ( U &  value,
Channel< T, L, G, C > &  channel 
)

Extract a value from the channel.

Template Parameters
Ubeing the type to store the data into
Tbeing the type of values in the channel
Lbeing the type of locks in the channel
Gbeing the type of lock guards in the channel
Cbeing the type of container used in the channel
Parameters
valuebeing the place to store the extracted data
channelbeing the channel to extract data from

Definition at line 425 of file Channel.h.

◆ operator>>()

template<class U , class T , class L , template< class > class G, class C >
void scl::async::operator>> ( U &&  value,
Channel< T, L, G, C > &  channel 
)

Forward a value into a channel.

Template Parameters
Ubeing the type of data to forward
Tbeing the type of values in the channel
Lbeing the type of locks in the channel
Gbeing the type of lock guards in the channel
Cbeing the type of container used in the channel
Parameters
valuebeing the value to forward
channelbeing the channel to forward the value into

Definition at line 410 of file Channel.h.

◆ with()

template<class Resource , class F >
auto scl::async::with ( Resource &&  res,
F &&  f 
) -> scl::tools::meta ::return_t<F>

Execute a transaction in a guarded manner.

Template Parameters
Resourcebeing the guarded/guarding resource type
Fbeing the transaction type
Parameters
resbeing the guarded/guarding resource
fbeing the transaction to execute

Definition at line 14 of file with.h.