orangy
mg6maciej
03/01/2017, 2:24 PMScreen Shot 2017-03-01 at 15.24.12.png▾
user
03/01/2017, 2:25 PMhttps://kotlinlang.slack.com/files/U0F8Y5E5A/F4C18MEN7/screen_shot_2017-03-01_at_15.24.12.png▾
user
03/01/2017, 2:32 PMhttps://kotlinlang.slack.com/files/U0F8Y5E5A/F4C18MEN7/screen_shot_2017-03-01_at_15.24.12.png▾
anthonyeef
03/01/2017, 2:32 PMScreen Shot 2017-03-01 at 15.24.12.png▾
user
03/01/2017, 2:32 PMhttps://kotlinlang.slack.com/files/U0F8Y5E5A/F4C18MEN7/screen_shot_2017-03-01_at_15.24.12.png▾
robin
03/01/2017, 2:33 PMLet's go deeper▾
elect
03/01/2017, 2:33 PMvmironov
03/01/2017, 2:34 PMelect
03/01/2017, 2:34 PMuser
03/01/2017, 2:38 PMhttps://kotlinlang.slack.com/files/U3E25GSEP/F4C60RQPP/pasted_image_at_2017_03_01_03_33_pm.png▾
robin
03/01/2017, 2:38 PMjaguililla
03/01/2017, 2:49 PMmg6maciej
03/01/2017, 2:50 PMvoddan
03/01/2017, 2:52 PMroman.belov
03/01/2017, 2:59 PMcedric
03/01/2017, 3:00 PMorangy
ilya.chernikov
03/01/2017, 3:07 PMdragas
03/01/2017, 3:07 PMArray<T>
?mg6maciej
03/01/2017, 3:07 PMfun <T> Array<T>.myFun() = 0
dragas
03/01/2017, 3:08 PMdragas
03/01/2017, 3:08 PM<T>
after fun
orangy
cedric
03/01/2017, 3:20 PMhendisantika34
03/01/2017, 3:51 PMKotlin 1.1 released▾
walmyrcarvalho
03/01/2017, 4:00 PMelizarov
03/01/2017, 4:11 PMMutex
. It can be fully concurrent:
fun <I, O> memoizeBlocking(f: suspend (I) -> O): suspend (I) -> O {
val cache = ConcurrentHashMap<I, Deferred<O>>()
return { i ->
val deferred = cache.getOrPut(i, {
async(Unconfined) { f(i) }
})
deferred.await()
}
}