coroutine are really confusing
# announcements
c
coroutine are really confusing
z
They definitely can be. I always reason about them converting to callbacks in my head: "Resume a coroutine" = invoke a callback "Suspend a coroutine" = pass a callback to something "Call a suspend function" = pass a callback to the function "Dispatch a coroutine" = post a callback on an executor "Channel" = blocking queue that accepts callbacks instead of actually blocking. Everything else is just shorthand for talking about callbacks.
☝🏼 4
c
channel are similar to goroutines
z
They are similar to channels in Go, yes. Afaik the only differences are that Go's channels are always finite, kotlin allows unbounded ones.
c
go routines channel are more with hardware and coroutines are more with functions 🙂
z
It's all pointers and machine code eventually
😄 1