proxygen
folly::pushmi::time_item_process_pred_fn< E, TP > Class Template Reference

#include <time_source.h>

Public Types

using time_point = std::decay_t< TP >
 

Public Member Functions

bool operator() (const std::shared_ptr< time_source_queue_base< E, TP >> &q)
 

Public Attributes

const time_pointstart_
 
time_pointearliest_
 

Detailed Description

template<class E, class TP>
class folly::pushmi::time_item_process_pred_fn< E, TP >

Definition at line 252 of file time_source.h.

Member Typedef Documentation

template<class E , class TP >
using folly::pushmi::time_item_process_pred_fn< E, TP >::time_point = std::decay_t<TP>

Definition at line 254 of file time_source.h.

Member Function Documentation

template<class E , class TP >
bool folly::pushmi::time_item_process_pred_fn< E, TP >::operator() ( const std::shared_ptr< time_source_queue_base< E, TP >> &  q)
inline

Definition at line 257 of file time_source.h.

References min, and start_.

257  {
258  // ready for dispatch if it has a ready item
259  bool ready =
260  !q->dispatching_ && !q->heap_.empty() && q->heap_.top().when <= *start_;
261  q->dispatching_ = ready;
262  q->pending_ = !ready && !q->heap_.empty();
263  // ready queues are ignored, they will update earliest_ after they have
264  // processed the ready items
265  *earliest_ = !ready && !q->heap_.empty()
266  ? min(*earliest_, q->heap_.top().when)
267  : *earliest_;
268  return q->pending_;
269  }
LogLevel min
Definition: LogLevel.cpp:30

Member Data Documentation

template<class E , class TP >
time_point* folly::pushmi::time_item_process_pred_fn< E, TP >::earliest_

Definition at line 256 of file time_source.h.

template<class E , class TP >
const time_point* folly::pushmi::time_item_process_pred_fn< E, TP >::start_

Definition at line 255 of file time_source.h.


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