is it accurate to say that coroutines are kotlins ...
# announcements
t
is it accurate to say that coroutines are kotlins implementation of green threading or is it different/ more than that?
s
Hi Patrick following the wikipedia defintion
Copy code
In computer programming, green threads are threads that are scheduled by a runtime library or virtual machine (VM) instead of natively by the underlying operating system.
I would say that Java Threads are "green threads" Coroutines are much more than that. They are basically a toolset for asynchronous programming which gives you not only concurrency but also continuation and suspension there is actually a very good tak from Roman Elizarov from Kotlinonf 2018

https://www.youtube.com/watch?v=a3agLJQ6vt8â–¾

k
Java `Thread`s aren't green they're scheduled by the OS, not the JVM.
s
Thanks for the Info Karel 🙂
j
I would say the difference is coroutines normally function via cooperation rather than random-ish interruption