twisterrob
06/14/2019, 9:27 AMget is deep in the DSL. I wonder what primitives you would suggest me to use to do the blocking.r4zzz4k
06/14/2019, 10:42 PMCompletableDeferred beforehand, then start an asynchronous process passing it in and then immediately start waiting on it. The asynchronous process can then complete passed CompletableDeferred either normally with a result (or Unit if no result is needed) or exceptionally, which would automatically resume waiting coroutine.
As for the Ktor, I recall there is a Boolean parameter on start method which allow it to suspend until server is not stopped, which should specifically do what you need.twisterrob
06/17/2019, 11:39 PMtwisterrob
06/17/2019, 11:43 PMget route though, but the blocking is nice. I'll play around.twisterrob
06/17/2019, 11:44 PMCompletableDeferred definitely gives really nice control to me over the flow.r4zzz4k
06/18/2019, 7:35 AM