for JVM, I strongly recommend Quasar <http://blog....
# coroutines
d
for JVM, I strongly recommend Quasar http://blog.paralleluniverse.co/2015/05/21/quasar-vs-akka/ for concurrent programming
🧌 1
e
Good project. Kotlin coroutines provide similar functionality on JVM but only if you write your suspendable code in Kotlin (no bytecode rewriting for arbitrary 3rd party code). Basically, Quasar’s
throws SuspendExecution
is semantically the same as Kotlin’s
suspend fun
p
@elizarov is it? quasar restores stack (traces)
e
Yes, it is. You can convert any Quasar code into Kotlin coroutines line-by-line, replacing
throws SuspendExecution
and
@Suspendable
into
suspend fun
as you go and it’ll work in a similar way. Kotlin also restores stack, though the implementation details differ (different performance tradeoffs). Quasar restores deep stacks eagerly, while Kotlin does it lazily
So, Kotlin’s resume is faster on deep stacks. Kotlin’s suspend is also faster. Kotlin is currently optimized for the code that does suspend, while quasar is faster on code that does not actually suspend.
đź‘Ť 1