Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
In both of these cases, an object with a specific type is used in place of the completion handler, and the return value of the initiating function is transformed from在这两种情况下,都使用具有特定类型的对象来替代完成处理器,且发起函数的返回值也从 `void`to转变为 `std::future<std::size_t>`or或 `std::size_t`. The handler is sometimes called a __CompletionToken__ when used in this context. The return type transformation is supported by customization points in the initiating function signature. Here is the signature for。在这种上下文中,该处理器有时被称为 __CompletionToken__。发起函数签名中的定制点支持这种返回值类型的转换。以下是 [@boost:/doc/html/boost_asio/reference/async_write/overload1.html `net::async_write`]:的签名: