书栈网 · BookStack 本次搜索耗时 0.036 秒,为您找到 355 个相关结果.
  • Shared state

    424 2021-05-16 《Tokio v1.6 Tutorial》
    Shared state Strategies Add bytes dependency Initialize the HashMap On using std::sync::Mutex Update process() Tasks, threads, and contention Holding a MutexGuard acros...
  • Runtime

    Runtime Tokio runtime Spawning Tasks Runtime In the previous section we explored Futures and Streams which allow us to representa value (in the case of a Future ) or a ser...
  • 介绍

    介绍 介绍 内部原理部分提供了Tokio内部的深入指南。 它期望读者已经很好地理解了如何使用Tokio。 那些不熟悉Tokio应该从入门 开始。 运行时模型 - Tokio异步运行时模型。 非阻塞I/O - Tokio网络相关类型实现细节 (TCP,UDP,…)。
  • Hello World!

    Hello World! Creating the stream Writing data Running the client task Running the code Next steps Hello World! To kick off our tour of Tokio, we will start with the obl...
  • Example: A Chat Server

    Example: A Chat Server Setup Chat State Line Codec Broadcasting Messages Final Touches Example: A Chat Server We’re going to use what has been covered so far to build a...
  • Executors

    495 2020-12-25 《Tokio v1.0 Tutorial》
    Executors Mini Tokio Executors Asynchronous Rust functions return futures. Futures must have poll called on them to advance their state. Futures are composed of other futures...
  • Getting asynchronous

    Getting asynchronous Chaining computations Getting asynchronous Futures are all about managing asynchronicity. Implementing a future thatcompletes asynchonously requires co...
  • 读写数据

    读写数据 非阻塞I/O 使用I/O Future 拆分I/O资源 传输 读写数据 非阻塞I/O 在概述 我们简单提到的是tokio的I/O类型实现了无阻塞异步版std::Read 和std::Write ,名为 AsyncRead 和AsyncWrite 。这些是Tokio的I/O中不可或缺的一部分,在使用I/O代码时,理解这些东东非常重...
  • Non-blocking I/O

    Non-blocking I/O The network resource. Using the resource Registering the resource with the driver Handle::current vs Handle::default The network driver Linking the driver wit...
  • Borrowing

    442 2020-12-25 《Tokio v1.0 Tutorial》
    Borrowing Borrowing When spawning tasks, the spawned async expression must own all of its data. The select! macro does not have this limitation. Each branch’s async expression...