What is the current status of the Actor API in the...
# coroutines
n
What is the current status of the Actor API in the KotlinX Coroutines library? I have a program (Industrial software that behaves like a Linux Daemon) running in production that heavily relies on the API, and would very likely break if a newer version of the KotlinX Coroutines library is used.
z
The
actor
coroutine builder is annotated with
@ObsoleteCoroutinesApi
, so it could change or even disappear in newer versions.
☝️ 1
r
I think it will be replaced by flow in the later versions
n
That would be very bad news since there is a need to support the Actor concurrency model ( https://en.wikipedia.org/wiki/Actor_model ), which is one of the major concurrency models. Flow is a implementation of the RX concurrency model, which doesn't cover the safe handling of mutable state like Actor does, and doesn't have the concept of supervisors ( https://doc.akka.io/docs/akka/2.5/general/supervision.html ).
z
There was a PR a couple years ago proposing a new API for typed actors, but i don’t think there’s been any work on that for a long time. I suspect that would be the replacement though, not Flow.
s
@napperley I’d recommend reading through the conversation here: https://github.com/Kotlin/kotlinx.coroutines/issues/87
👍 1