proxygen
folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Pusher< all > Class Template Reference
Inheritance diagram for folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Pusher< all >:
folly::gen::Operator< Pusher< all > > folly::gen::FBounded< Self >

Public Member Functions

 Pusher (OutQueue *queue)
 
template<class Value , class InnerSource >
void compose (const GenImpl< Value, InnerSource > &source) const
 
- Public Member Functions inherited from folly::gen::Operator< Pusher< all > >
ResultGen compose (const GenImpl< Value, Source > &source) const
 
- Public Member Functions inherited from folly::gen::FBounded< Self >
const Self & self () const
 
Self & self ()
 

Private Attributes

OutQueuequeue_
 

Additional Inherited Members

- Protected Member Functions inherited from folly::gen::Operator< Pusher< all > >
 Operator ()=default
 
 Operator (Operator &&) noexcept=default
 
 Operator (const Operator &)=default
 
Operatoroperator= (Operator &&) noexcept=default
 
Operatoroperator= (const Operator &)=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>
template<bool all = false>
class folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Pusher< all >

Definition at line 209 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>
template<bool all = false>
folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Pusher< all >::Pusher ( OutQueue queue)
inlineexplicit

Definition at line 213 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<bool all = false>
template<class Value , class InnerSource >
void folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Pusher< all >::compose ( const GenImpl< Value, InnerSource > &  source) const
inline

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

References folly::gen::all(), folly::gen::FBounded< Self >::self(), folly::value(), testing::Value(), and folly::gen::detail::ClosableMPMCQueue< T >::writeUnlessClosed().

216  {
217  if (all) {
218  source.self().foreach([&](Value value) {
219  queue_->writeUnlessClosed(std::forward<Value>(value));
220  });
221  } else {
222  source.self().apply([&](Value value) {
223  return queue_->writeUnlessClosed(std::forward<Value>(value));
224  });
225  }
226  }
bool Value(const T &value, M matcher)
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
bool writeUnlessClosed(Args &&...args)
Definition: Parallel-inl.h:90
Composed all(Predicate pred=Predicate())
Definition: Base.h:786

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>
template<bool all = false>
OutQueue* folly::gen::detail::Parallel< Ops >::Generator< Input, Source, InputDecayed, Composed, Output, OutputDecayed >::Pusher< all >::queue_
private

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


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