dave08
05/21/2018, 2:58 PMfun startActor(name: String) = actor<Request> {
.....
if (finished) it.close()
}
val actors = mutableMapOf<String, SendChannel>()
fun request(name: String) {
actors.getOrPut(name) { startActor(name) }
}
How could I make sure that request() will return a fresh new actor if it was closed?