proxygen
folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Puller Class Reference
Inheritance diagram for folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Puller:
folly::gen::GenImpl< InputDecayed &&, Puller > folly::gen::FBounded< Self >

Public Member Functions

 Puller (InQueue *queue)
 
template<class Handler >
bool apply (Handler &&handler) const
 
template<class Body >
void foreach (Body &&body) const
 
- Public Member Functions inherited from folly::gen::GenImpl< InputDecayed &&, Puller >
bool apply (Handler &&handler) const
 
void foreach (Body &&body) const
 
- Public Member Functions inherited from folly::gen::FBounded< Self >
const Self & self () const
 
Self & self ()
 

Private Attributes

InQueuequeue_
 

Additional Inherited Members

- Public Types inherited from folly::gen::GenImpl< InputDecayed &&, Puller >
typedef InputDecayed && ValueType
 
typedef std::decay< InputDecayed && >::type StorageType
 
- Static Public Attributes inherited from folly::gen::GenImpl< InputDecayed &&, Puller >
static constexpr bool infinite
 
- Protected Member Functions inherited from folly::gen::GenImpl< InputDecayed &&, Puller >
 GenImpl ()=default
 
 GenImpl (GenImpl &&)=default
 
 GenImpl (const GenImpl &)=default
 
GenImploperator= (GenImpl &&)=default
 
GenImploperator= (const GenImpl &)=default
 

Detailed Description

template<class Ops>
template<class Input, class Source, class InputDecayed = typename std::decay<Input>::type, class Composed = decltype(std::declval<Ops>().compose(Empty<InputDecayed&&>())), class Output = typename Composed::ValueType, class OutputDecayed = typename std::decay<Output>::type>
class folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Puller

Definition at line 182 of file Parallel-inl.h.

Constructor & Destructor Documentation

template<class Ops >
template<class Input , class Source , class InputDecayed = typename std::decay<Input>::type, class Composed = decltype(std::declval<Ops>().compose(Empty<InputDecayed&&>())), class Output = typename Composed::ValueType, class OutputDecayed = typename std::decay<Output>::type>
folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Puller::Puller ( InQueue queue)
inlineexplicit

Definition at line 186 of file Parallel-inl.h.

Member Function Documentation

template<class Ops >
template<class Input , class Source , class InputDecayed = typename std::decay<Input>::type, class Composed = decltype(std::declval<Ops>().compose(Empty<InputDecayed&&>())), class Output = typename Composed::ValueType, class OutputDecayed = typename std::decay<Output>::type>
template<class Handler >
bool folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Puller::apply ( Handler &&  handler) const
inline

Definition at line 189 of file Parallel-inl.h.

References handler(), folly::gen::move, and folly::gen::detail::ClosableMPMCQueue< T >::readUnlessClosed().

189  {
190  InputDecayed input;
191  while (queue_->readUnlessClosed(input)) {
192  if (!handler(std::move(input))) {
193  return false;
194  }
195  }
196  return true;
197  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
void handler(int, siginfo_t *, void *)
template<class Ops >
template<class Input , class Source , class InputDecayed = typename std::decay<Input>::type, class Composed = decltype(std::declval<Ops>().compose(Empty<InputDecayed&&>())), class Output = typename Composed::ValueType, class OutputDecayed = typename std::decay<Output>::type>
template<class Body >
void folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Puller::foreach ( Body &&  body) const
inline

Definition at line 200 of file Parallel-inl.h.

References folly::gen::move, and folly::gen::detail::ClosableMPMCQueue< T >::readUnlessClosed().

200  {
201  InputDecayed input;
202  while (queue_->readUnlessClosed(input)) {
203  body(std::move(input));
204  }
205  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567

Member Data Documentation

template<class Ops >
template<class Input , class Source , class InputDecayed = typename std::decay<Input>::type, class Composed = decltype(std::declval<Ops>().compose(Empty<InputDecayed&&>())), class Output = typename Composed::ValueType, class OutputDecayed = typename std::decay<Output>::type>
InQueue* folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Puller::queue_
private

Definition at line 183 of file Parallel-inl.h.


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