Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
Networking prescribes facilities to determine the context in which handlers run. Every I/O object refers to an __ExecutionContext__ for obtaining the __Executor__ instance used to invoke completion handlers. An executor determines where and how completion handlers are invoked. Executors obtained from an instance of __io_context__ offer a basic guarantee: handlers will only be invoked from threads which are currently calling网络库规定用于确定处理器运行上下文的设施。每个 I/O 对象都关联一个 __ExecutionContext__,用于获取调用完成处理器所需的 __Executor__ 实例。执行器决定完成处理器的调用位置与方式。从 __io_context__ 实例获取的执行器提供一项基本保证:处理器仅会在当前正在调用 [@boost:/doc/html/boost_asio/reference/io_context/run/overload1.html `net::io_context::run`].的线程中被执行。