proxygen
p1055 Namespace Reference

Functions

template<class Executor , class Function , class Future >
auto then_execute (Executor &&e, Function &&f, Future &&pred)
 
template<class Executor , class Function >
auto twoway_execute (Executor &&e, Function &&f)
 

Function Documentation

template<class Executor , class Function , class Future >
auto p1055::then_execute ( Executor &&  e,
Function &&  f,
Future &&  pred 
)

Definition at line 106 of file then_execute_2.cpp.

References f, folly::pushmi::strands(), folly::pushmi::operators::transform, and folly::pushmi::operators::via.

Referenced by main().

106  {
107  return pred | op::via(mi::strands(e)) |
108  op::transform([f](auto v) { return f(v); });
109 }
auto f
requires Invocable< ExecutorFactory & > &&Executor< invoke_result_t< ExecutorFactory & > > &&ConcurrentSequence< invoke_result_t< ExecutorFactory & > > auto strands(ExecutorFactory ef)
Definition: strand.h:246
PUSHMI_INLINE_VAR constexpr detail::transform_fn transform
Definition: transform.h:158
PUSHMI_INLINE_VAR constexpr detail::via_fn via
Definition: via.h:166
template<class Executor , class Function >
auto p1055::twoway_execute ( Executor &&  e,
Function &&  f 
)

Definition at line 69 of file twoway_execute_2.cpp.

References f, and folly::pushmi::operators::transform.

Referenced by main().

69  {
70  return e | op::transform([f](auto) { return f(); });
71 }
auto f
PUSHMI_INLINE_VAR constexpr detail::transform_fn transform
Definition: transform.h:158