pika icon indicating copy to clipboard operation
pika copied to clipboard

Add then-like adaptor which sends values from predecessor sender instead of return value of function

Open msimberg opened this issue 4 years ago • 0 comments

This could be useful in a few places:

  • Forwarding values for the bulk customization for cuda_scheduler (and possibly also for the thread_pool_scheduler one)
  • For creating wrappers where you want the arguments to be used by the next adaptor

i.e. something that would do this:

just(1, "hello") | then_passthrough([](int, string) -> void {...}) | then([](int, string) {...}) 

This could possibly be achieved with something like let_value, but are the lifetimes handled correctly? Alternatively, wrapping the callable in something that returns the arguments in a tuple together with another adaptor which calls apply with the callable and the tuple could be helpful in implementing it.

msimberg avatar Feb 03 '22 12:02 msimberg