pika
pika copied to clipboard
Add then-like adaptor which sends values from predecessor sender instead of return value of function
This could be useful in a few places:
- Forwarding values for the bulk customization for
cuda_scheduler(and possibly also for thethread_pool_schedulerone) - 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.