Aha, this code has a runBlocking in a suspend func...
# kroto-plus
r
Aha, this code has a runBlocking in a suspend function, not good!
m
What is it supposed to use if you need a coroutine context? EX: I wrote some code in a generateSequence call that needed to call another suspend.
override suspend foo() = coroutineScope { generateSequence { bar() }. forEach( baz(it) ) }
bar invocation gets an IDE error in IJ saying a context is needed for a suspend fn call
For context I’m using this on a streaming gRPC endpoint with the KrotoPlus coroutine support
r
Use the
sequence
builder, which provides a suspendable
SequenceScope
in which you generate your sequence.
@mkerr -^
m
cool thanks