swift
Loading...
Searching...
No Matches
swift::misc::LockFreeReader< T > Class Template Reference

Return value of LockFree::read(). More...

#include <lockfree.h>

Public Member Functions

 LockFreeReader (const LockFreeReader &)=default
 Copy constructor.
LockFreeReader & operator= (const LockFreeReader &)=default
 Copy assignment operator.
const T & get () const
 Return the value that was present when the reader was created.
const T * operator-> () const
 Return the value that was present when the reader was created.
const T & operator* () const
 Return the value that was present when the reader was created.
 operator const T & () const
 Return the value that was present when the reader was created.

Friends

class LockFree< std::remove_const_t< T > >

Detailed Description

template<typename T>
class swift::misc::LockFreeReader< T >

Return value of LockFree::read().

Allows any one thread to safely read from the lock-free object.

Definition at line 31 of file lockfree.h.

Member Function Documentation

◆ get()

template<typename T>
const T & swift::misc::LockFreeReader< T >::get ( ) const
inline

Return the value that was present when the reader was created.

Definition at line 36 of file lockfree.h.

◆ operator const T &()

template<typename T>
swift::misc::LockFreeReader< T >::operator const T & ( ) const
inline

Return the value that was present when the reader was created.

Definition at line 39 of file lockfree.h.

◆ operator*()

template<typename T>
const T & swift::misc::LockFreeReader< T >::operator* ( ) const
inline

Return the value that was present when the reader was created.

Definition at line 38 of file lockfree.h.

◆ operator->()

template<typename T>
const T * swift::misc::LockFreeReader< T >::operator-> ( ) const
inline

Return the value that was present when the reader was created.

Definition at line 37 of file lockfree.h.

◆ LockFree< std::remove_const_t< T > >

template<typename T>
friend class LockFree< std::remove_const_t< T > >
friend

Definition at line 46 of file lockfree.h.


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