nfrankel
06/21/2020, 7:37 PMaltavir
06/21/2020, 9:09 PMnfrankel
06/21/2020, 9:45 PMRobert Jaros
06/21/2020, 10:04 PMsdeleuze
06/22/2020, 5:31 AMaltavir
06/22/2020, 6:02 AMsdeleuze
06/22/2020, 6:14 AMaltavir
06/22/2020, 6:18 AMnfrankel
06/22/2020, 7:21 AMaltavir
06/22/2020, 7:23 AMsuresh
06/22/2020, 7:37 AMaltavir
06/22/2020, 7:41 AMsdeleuze
06/22/2020, 7:47 AMaltavir
06/22/2020, 7:53 AMsuresh
06/22/2020, 7:53 AMyou need 3-4 virtual threads with futures to properly describe the same situationWhy can’t it part of the same virtual thread?
suresh
06/22/2020, 7:53 AMsuspend fun test() {
anotherSuspend1()
anotherSuspend2()
anotherSuspend2()
}
suresh
06/22/2020, 7:53 AMfun test() {
blocking1()
blocking2()
blocking3()
}
Thread.startVirtualThread{
test()
}
suresh
06/22/2020, 7:53 AMaltavir
06/22/2020, 7:54 AMsuspend fun test(){
val res = async{...}
val res2 = res.await() + 1
}
Or some channel send operations. You can't do those with synchronous calls without spawning additional virtual threads.suresh
06/22/2020, 8:01 AMsuresh
06/22/2020, 8:02 AMsuresh
06/22/2020, 8:05 AMSome channel send operationsDoug lea is already building new Carrier APIs for channel operations - http://gee.cs.oswego.edu/dl/wwwtmp/Carrier.java
cedric
06/22/2020, 8:44 PMA significant difference with Coroutines is that API are not coloredEr... what? Kotlin's coroutines are colored. As soon as you use a coroutine, your method is marked as
suspend
, receives that funky icon in the margin, and all callers automatically become `suspend`as well since a dispatcher is neededsdeleuze
06/23/2020, 6:51 AMA significant difference with Coroutines is that with Loom API are not colored
cedric
06/23/2020, 5:07 PMraulraja
06/24/2020, 11:16 AMlist {
val a = listOf(1,2,3)()
a + 1
}
//[2,3,4]
raulraja
06/24/2020, 11:18 AMraulraja
06/24/2020, 11:20 AMJilles van Gurp
06/25/2020, 10:56 AM