书栈网 · BookStack 本次搜索耗时 0.030 秒,为您找到 343 个相关结果.
  • 介绍

    介绍 介绍 内部原理部分提供了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...
  • Shared state

    340 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...
  • Executors

    420 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...
  • 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...
  • 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...
  • Getting asynchronous

    Getting asynchronous Chaining computations Getting asynchronous Futures are all about managing asynchronicity. Implementing a future thatcompletes asynchonously requires co...
  • Spawning

    423 2021-05-16 《Tokio v1.6 Tutorial》
    Spawning Accepting sockets Concurrency Tasks 'static bound Send bound Store values Spawning We are going to shift gears and start working on the Redis server. First, m...
  • 读写数据

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