书栈网 · BookStack 本次搜索耗时 0.027 秒,为您找到 377 个相关结果.
  • Per-task concurrency

    452 2020-12-25 《Tokio v1.0 Tutorial》
    Per-task concurrency Per-task concurrency Both tokio::spawn and select! enable running concurrent asynchronous operations. However, the strategy used to run concurrent operat...
  • Timers

    Timers 一段时间后运行代码 计时耗时操作 在间隔时间段上运行代码 计时器的注意事项 Timers 在编写基于网络的应用程序时,通常需要根据时间执行操作。 在一段时间后运行一些代码。 取消运行时间过长的运行操作。 以一定间隔重复执行操作。这些用例通过使用计时器模块中提供的各种计时器API来处理。 一段时间后运行代码 在这种情况下...
  • Streams

    Streams The Stream trait Fibonacci Getting asynchronous Combinators Essential combinators Concrete streams Adapters Streams Streams are similar to futures, but instea...
  • Accepting sockets

    651 2020-12-25 《Tokio v1.0 Tutorial》
    Accepting sockets Accepting sockets The first thing our Redis server needs to do is to accept inbound TCP sockets. This is done with tokio::net::TcpListener . Many of Tokio’...
  • Implementing futures

    Implementing futures The Future trait. Running the future Cleaning things up Implementing futures Implementing futures is very common when using Tokio. Let’s start with a...
  • Pattern matching

    487 2020-12-25 《Tokio v1.0 Tutorial》
    Pattern matching Pattern matching Recall that the select! macro branch syntax was defined as: <pattern> = <async expression > => <handler> , So far, we have only use...
  • Wakers

    608 2020-12-25 《Tokio v1.0 Tutorial》
    Wakers Updating Delay Updating Mini Tokio Wakers Wakers are the missing piece. This is the system by which a resource is able to notify the waiting task that the resource ha...
  • Glossary

    496 2021-05-16 《Tokio v1.6 Tutorial》
    Glossary Asynchronous Concurrency and parallelism Future Executor/scheduler Runtime Task Spawning Async block Async function Yielding Blocking Stream Channel Backpress...
  • Return value

    402 2020-12-25 《Tokio v1.0 Tutorial》
    Return value Return value The tokio::select! macro returns the result of the evaluated <handler> expression. async fn computation1 () -> String { // .. computat...
  • Async in depth

    503 2021-05-16 《Tokio v1.6 Tutorial》
    Async in depth Futures Implementing Future Async fn as a Future Executors Mini Tokio Wakers Updating Delay Updating Mini Tokio Summary A few loose ends Notify utility ...