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

    Spawning Communicating with tasks Multi threaded When to spawn tasks Processing inbound sockets Background processing Coordinating access to a resource When not to spawn tas...
  • I/O

    446 2021-05-16 《Tokio v1.6 Tutorial》
    I/O AsyncRead and AsyncWrite async fn read() async fn read_to_end() async fn write() async fn write_all() Helper functions Echo server Using io::copy() Splitting a r...
  • Streams

    451 2020-12-25 《Tokio v1.0 Tutorial》
    Streams Streams A stream is an asynchronous series of values. It is the asynchronous equivalent to Rust’s std::iter::Iterator and is represented by the Stream trait. Stream...
  • AsyncRead and AsyncWrite

    565 2020-12-25 《Tokio v1.0 Tutorial》
    AsyncRead and AsyncWrite async fn read() async fn read_to_end() async fn write() async fn write_all() AsyncRead and AsyncWrite These two traits provide the faciliti...
  • I/O Overview

    I/O Overview An example server I/O Overview The Rust standard library provides support for networking and I/O, suchas TCP connections, UDP sockets, reading from and writing...
  • Example: An Echo Server

    Example: An Echo Server Setup Handling the connections Example: An Echo Server We’re going to use what has been covered so far to build an echo server. This is aTokio appl...
  • Concurrency

    812 2020-12-25 《Tokio v1.0 Tutorial》
    Concurrency Tasks 'static bound Send bound Concurrency Our server has a slight problem (besides only responding with errors). It processes inbound requests one at a time. ...
  • Initialize the HashMap

    667 2020-12-25 《Tokio v1.0 Tutorial》
    Initialize the HashMap On using std::sync::Mutex Initialize the HashMap The HashMap will be shared across many tasks and potentially many threads. To support this, it is w...
  • Reading and Writing Data

    Reading and Writing Data Non-blocking I/O Working with I/O futures Split I/O resources Transports Reading and Writing Data Non-blocking I/O In the overview we mention...
  • Syntax

    547 2020-12-25 《Tokio v1.0 Tutorial》
    Syntax Syntax The select! macro can handle more than two branches. The current limit is 64 branches. Each branch is structured as: <pattern> = <async expression > => <h...