Is there a way to use sequence {} with a suspend context? I'm using ktor to stream audio from an endpoint and would like to yield this in parts, but I get the error "Restricted suspending functions can only invoke member or extension suspending functions on their restricted coroutine scope"
s
streetsofboston
04/12/2022, 2:27 PM
Maybe you can use a Flow instead? A Sequence is not parallel (only asynchronous), all must be called on the same thread.