Open
Description
To improve the user-experience of sender/receiver we should also provide a coroutine task type that allows users to implement and consume senders by writing a coroutine.
Some basic requirements:
- ability to customize the allocation
- ability to customize the set of receiver queries to be forwarded through to children of the coroutine
- ability to specify a scheduler and ensure that the coroutine always resumes on that scheduler
- ability to automatically propagate stop-requests through the coroutine to awaited child operations
- ability for a task coroutine to complete with a 'stopped' result
Other things to consider:
- ability to schedule async cleanup operations to run upon coroutine exit
- ability to yield an error result without throwing an exception
- issue of stack-overflow when awaiting senders in a loop (see also recursion, inline completion, and stack usage #135 and Propose symmetric transfer for senders (tail senders?) #38)