swift
Public Member Functions | Friends | List of all members
swift::misc::LockFreeUniqueWriter< T > Class Template Reference

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

Public Member Functions

LockFreeUniqueWriteroperator= (const T &other)
 Replace the stored value by copying from a T. The change is applied in the destructor.
 
LockFreeUniqueWriteroperator= (T &&other) noexcept(std::is_nothrow_move_assignable_v< T >)
 Replace the stored value by moving from a T. The change is applied in the destructor.
 
 LockFreeUniqueWriter (LockFreeUniqueWriter &&other) noexcept
 Move constructor.
 
LockFreeUniqueWriteroperator= (LockFreeUniqueWriter &&other) noexcept
 Move assignment operator.
 
 ~LockFreeUniqueWriter ()
 Destructor. The original object will be overwritten by the new one stored in the writer.
 
T & get ()
 The value can be modified through the returned reference. The modification is applied in the destructor.
 
T * operator-> ()
 The value can be modified through the returned reference. The modification is applied in the destructor.
 
T & operator* ()
 The value can be modified through the returned reference. The modification is applied in the destructor.
 
 operator T& ()
 The value can be modified through the returned reference. The modification is applied in the destructor.
 
 LockFreeUniqueWriter (const LockFreeUniqueWriter &)=delete
 LockFreeUniqueWriter cannot be copied.
 
LockFreeUniqueWriteroperator= (const LockFreeUniqueWriter &)=delete
 LockFreeUniqueWriter cannot be copied.
 

Friends

class LockFree< T >
 

Detailed Description

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

Return value of LockFree::uniqueWrite().

Allows any one thread to safely write to the lock-free object, as long as no other thread write to it.

Definition at line 60 of file lockfree.h.


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