Expand description
Values of this type represent “execution scopes” used by the library to give fine grained control of the lifetimes of the tasks associated with particular connections. When a new connection is attached to a pseudo directory tree, an execution scope is provided. This scope is then used to start any tasks related to this connection. All connections opened as a result of operations on this first connection will also use the same scope, as well as any tasks related to those connections.
This way, it is possible to control the lifetime of a group of connections. All connections
and their tasks can be shutdown by calling shutdown
method on the scope that is hosting them.
Scope will also shutdown all the tasks when it goes out of scope.
Implementation wise, execution scope is just a proxy, that forwards all the tasks to an actual
executor, provided as an instance of a [futures::task::Spawn
] trait.
Structs§
- An execution scope that is hosting tasks for a group of connections. See the module level documentation for details.
Functions§
- Yields to the executor, providing an opportunity for other futures to run.