Actors
The last building block introduced in this chapter is actors. Similar to producer(), actor() is a coroutine bound to a channel. But instead of a channel going out of the coroutine, there's a channel going into the coroutine. If you think that was too academic, read on for another explanation.
So what is an actor, anyway? Let's look at an interaction between Michael and me, an imaginary product manager, who happens to be a canary, as you may remember from Chapter 4, Getting Familiar with Behavioral Patterns. Michael has a list of tasks that need to be completed before the end of the sprint/week/month. And he simply throws them at me, in the hope that I'll do my magic and translate some vague specifications into a working code. He's ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access