proxygen
wangle::Observable< T, InlineObservers >::Unsubscriber Class Reference

Public Member Functions

 Unsubscriber (Observable *observable)
 
void unsubscribe (uint64_t id)
 
void disable ()
 

Private Attributes

folly::SharedMutex lock_
 
Observableobservable_
 

Detailed Description

template<class T, size_t InlineObservers>
class wangle::Observable< T, InlineObservers >::Unsubscriber

Definition at line 209 of file Observable.h.

Constructor & Destructor Documentation

template<class T, size_t InlineObservers>
wangle::Observable< T, InlineObservers >::Unsubscriber::Unsubscriber ( Observable observable)
inlineexplicit

Definition at line 211 of file Observable.h.

211  : observable_(observable) {
212  CHECK(observable_);
213  }

Member Function Documentation

template<class T, size_t InlineObservers>
void wangle::Observable< T, InlineObservers >::Unsubscriber::disable ( )
inline

Definition at line 223 of file Observable.h.

References folly::gen::guard().

223  {
225  observable_ = nullptr;
226  }
GuardImpl guard(ErrorHandler &&handler)
Definition: Base.h:840
template<class T, size_t InlineObservers>
void wangle::Observable< T, InlineObservers >::Unsubscriber::unsubscribe ( uint64_t  id)
inline

Definition at line 215 of file Observable.h.

References folly::gen::guard().

215  {
216  CHECK(id > 0);
218  if (observable_) {
220  }
221  }
void unsubscribe(uint64_t id)
Definition: Observable.h:238
GuardImpl guard(ErrorHandler &&handler)
Definition: Base.h:840

Member Data Documentation

template<class T, size_t InlineObservers>
folly::SharedMutex wangle::Observable< T, InlineObservers >::Unsubscriber::lock_
private

Definition at line 229 of file Observable.h.

template<class T, size_t InlineObservers>
Observable* wangle::Observable< T, InlineObservers >::Unsubscriber::observable_
private

Definition at line 230 of file Observable.h.


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