notes

Log | Files | Refs | README

queuing.md (547B)


      1 # Queuing
      2 
      3 Concurrency and queuing with tokio in rust must be explicitly introduced. Ways
      4 to do this include:
      5 
      6 - tokio::spawn
      7 - select!
      8 - join!
      9 - mpsc::channel
     10 
     11 When doing so, take care to ensure the total amount of concurrency is bounded.
     12 For example, when writing a TCP accept loop, ensure that the total number of
     13 open sockets is bounded. When using mpsc::channel, pick a manageable channel
     14 capacity. Specific bound values will be application specific.
     15 
     16 Taking care and picking good bounds is a big part of writing reliable Tokio
     17 applications.