The coroutine context

The execution of a coroutine always happens inside a context. This context is a group of elements that will allow us to define how the coroutine will be executed and how it should behave. Let's start by talking about some of the contexts that we have already seen.

Each of the items in the context can be considered a context with a single element, that is, a context with a single behavior defined. As explained, a context can actually contain more than one element, so in the next section we will learn how to add and remove elements from a context to create combined behaviors. But for now, we want to talk about them as individual contexts to better explain how they work by themselves.

..................Content has been hidden....................

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