
144: Kotlin Coroutines with Marcin Moskala
Programming Throwdown
00:00
How to Shoot Yourself in the Foot With Async Await
In Coplet, we use coroutines. And those coroutines have their own pool of threads because the coroutine coroutine library has a default built-in support for pool of threads. So that when you start a coroutine, you can decide on what pool of threads it is supposed to run. And if in this case, it will run on the optimal number of threads for your machine. If you have a 16 core server, it will start 16 cores and probably tens of thousands of requests will be on tons of thousands of coroutines with practically no burden at all. But suspending and assuming is a very cheap operation. The other thing is you can really shoot yourself
Transcript
Play full episode