proxygen
folly::pushmi::time_source_executor< E, TP, NF, Executor > Class Template Reference

#include <time_source.h>

Public Types

using properties = property_set< is_time<>, is_executor<>, is_maybe_blocking<>, is_fifo_sequence<>, is_single<>>
 

Public Member Functions

 time_source_executor (std::shared_ptr< time_source_shared< E, time_point >> source, std::shared_ptr< time_source_queue< E, time_point, NF, Executor >> queue)
 
auto top ()
 
auto executor ()
 
requires Regular< TPA > &&ReceiveValue< Out, any_time_executor_ref< E, TP > > &&ReceiveError< Out, E > void submit (TPA tp, Out out)
 

Private Types

using time_point = std::decay_t< TP >
 

Private Attributes

std::shared_ptr< time_source_shared< E, time_point > > source_
 
std::shared_ptr< time_source_queue< E, time_point, NF, Executor > > queue_
 

Detailed Description

template<class E, class TP, class NF, class Executor>
class folly::pushmi::time_source_executor< E, TP, NF, Executor >

Definition at line 34 of file time_source.h.

Member Typedef Documentation

template<class E , class TP , class NF , class Executor >
using folly::pushmi::time_source_executor< E, TP, NF, Executor >::properties = property_set< is_time<>, is_executor<>, is_maybe_blocking<>, is_fifo_sequence<>, is_single<>>

Definition at line 452 of file time_source.h.

template<class E , class TP , class NF , class Executor >
using folly::pushmi::time_source_executor< E, TP, NF, Executor >::time_point = std::decay_t<TP>
private

Definition at line 442 of file time_source.h.

Constructor & Destructor Documentation

template<class E , class TP , class NF , class Executor >
folly::pushmi::time_source_executor< E, TP, NF, Executor >::time_source_executor ( std::shared_ptr< time_source_shared< E, time_point >>  source,
std::shared_ptr< time_source_queue< E, time_point, NF, Executor >>  queue 
)
inline

Definition at line 454 of file time_source.h.

457  : source_(std::move(source)), queue_(std::move(queue)) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
std::shared_ptr< time_source_shared< E, time_point > > source_
Definition: time_source.h:443
std::shared_ptr< time_source_queue< E, time_point, NF, Executor > > queue_
Definition: time_source.h:444

Member Function Documentation

template<class E , class TP , class NF , class Executor >
auto folly::pushmi::time_source_executor< E, TP, NF, Executor >::executor ( )
inline

Definition at line 462 of file time_source.h.

References folly::pushmi::PUSHMI_TEMPLATE(), and folly::pushmi::requires().

462  {
463  return *this;
464  }
template<class E , class TP , class NF , class Executor >
requires Regular<TPA>&& ReceiveValue<Out, any_time_executor_ref<E, TP> >&& ReceiveError<Out, E> void folly::pushmi::time_source_executor< E, TP, NF, Executor >::submit ( TPA  tp,
Out  out 
)
inline

Definition at line 469 of file time_source.h.

References folly::gen::move, and folly::pushmi::__adl::tp.

469  {
470  // queue for later
471  source_->insert(
472  queue_,
473  time_heap_item<E, TP>{
474  tp, any_receiver<E, any_time_executor_ref<E, TP>>{std::move(out)}});
475  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
std::shared_ptr< time_source_shared< E, time_point > > source_
Definition: time_source.h:443
std::shared_ptr< time_source_queue< E, time_point, NF, Executor > > queue_
Definition: time_source.h:444
template<class E , class TP , class NF , class Executor >
auto folly::pushmi::time_source_executor< E, TP, NF, Executor >::top ( )
inline

Definition at line 459 of file time_source.h.

459  {
460  return queue_->nf_();
461  }
std::shared_ptr< time_source_queue< E, time_point, NF, Executor > > queue_
Definition: time_source.h:444

Member Data Documentation

template<class E , class TP , class NF , class Executor >
std::shared_ptr<time_source_queue<E, time_point, NF, Executor> > folly::pushmi::time_source_executor< E, TP, NF, Executor >::queue_
private

Definition at line 444 of file time_source.h.

template<class E , class TP , class NF , class Executor >
std::shared_ptr<time_source_shared<E, time_point> > folly::pushmi::time_source_executor< E, TP, NF, Executor >::source_
private

Definition at line 443 of file time_source.h.


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