Sending the updated value through the channel

The missing part in ResultsCounter is to actually send the updated value using the channel. Let's update the actor to do so:

private val actor = actor<Void?>(context) {
for (msg in channel) {
counter++
notifications.send(counter)
}
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.128.145