async-std

@asyncrs

The twitter account of the project.

In your cores
Vrijeme pridruživanja: kolovoz 2019.

Medijski sadržaj

  1. 24. pro 2019.

    Woooo! We're over 50000 downloads and counting!

    52.521 downloads on crates.io
  2. 20. pro 2019.

    async-std v1.4.0 has been released! ⬩ Future::timeout ⬩ Documentation fixes ⬩ io::Bytes ⬩ io::Chain ⬩ io::Take Changelog:

    use async_std::prelude::*; use async_std::future; use std::time::Duration;  let fut = future::pending::<()>(); // This future will never resolve. let res = fut.timeout(Duration::from_millis(100)).await; assert!(res.is_err()); // The future timed out, returning an err.
  3. 18. pro 2019.
  4. 16. pro 2019.

    So, how about speed? The new runtime is faster over 1.3.0, especially scaling much better. How do you use it? Just try out our current PR branch, instructions are in the blog post. async-std is fully compatible to futures-rs, for your ease!

    Prikaži ovu nit
  5. 16. pro 2019.

    Don't let anyone block you! We're introducing a new adaptive, -inspired, async runtime that automatically detects blocking behaviour and just continues to run and run. Don't worry about separate blocking and non-blocking tasks anymore!

    Prikaži ovu nit
  6. 13. pro 2019.

    async-std v1.3.0 has been released! ⬩ Stream::delay ⬩ Faster compilation ⬩ DoubleEndedStream::rfind ⬩ DoubleEndedStream::nth_back ⬩ DoubleEndedStream::rfold ⬩ Documentation fixes Changelog:

    let start = Instant::now(); let mut s = stream::from_iter(vec![0u8, 1]).delay(Duration::from_millis(200));  // The first time will take more than 200ms due to delay. s.next().await; assert!(start.elapsed().as_millis() >= 200);  // There will be no delay after the first time. s.next().await; assert!(start.elapsed().as_millis() <= 210);
  7. 5. pro 2019.

    Wooooo! We're over 30000 downloads and counting!

  8. 27. stu 2019.

    async-std v1.2.0 has been released! ⬩ Stream::unzip ⬩ More descriptive errors ⬩ Easier Future::join ⬩ Bug fixes Changelog:

    use async_std::prelude::*; use async_std::stream;  let s  = stream::from_iter(vec![(1,2), (3,4)]);  let (left, right): (Vec<_>, Vec<_>) = s.unzip().await;  assert_eq!(left, [1, 3]); assert_eq!(right, [2, 4]);
  9. 21. stu 2019.

    async-std v1.1.0 has been released! ⬩ Faster scheduler ⬩ Stabilized task::yield_now ⬩ Improved errors ⬩ stream::successors ⬩ Windows symlink APIs ⬩ Stream::throttle Changelog:

    An example using Stream::throttle
  10. 12. stu 2019.
  11. 29. lis 2019.

    async-std v0.99.11 has been released! ⬩ Added sync::channel ⬩ Added Future::delay ⬩ Added Stream::timeout ⬩ Fixes for task::block_on ⬩ Faster fs::File operations Changelog:

    An example of how to use async_std channels
  12. 9. lis 2019.

    async-std v0.99.9 has been released! This includes: ⬩ rustc 1.39.0-beta compat ⬩ 21 `FromStream` conversions ⬩ `task::blocking` ⬩ `path` submodule ⬩ `Stream::map` ⬩ `Stream::for_each` ⬩ `Stream::try_for_each`

    Example using task::blocking
  13. 26. ruj 2019.

    async-std v0.99.7 has been released! This release includes 16 new APIs, including new streams combinators, Futures concurrency macros, and extensions to the sync and io submodules.

    An example using future::join to join 3 futures.
  14. 19. ruj 2019.

    async-std v0.99.6 has been released. This release adds several new combinators, a work-stealing executor, and the ability to collect streams into structs.

    An example joining 3 streams and collecting their outputs into a vector.
  15. 16. kol 2019.

    It faithfully recreates the standard libs interface for usage in modern `async/await` applications. Want to know more? It comes with extensive docs, a book and a big tutorial!

    
#![feature(async_await)]

use std::time::Duration;

use async_std::io;
use async_std::task;

fn main() -> io::Result<()> {
    // This async scope times out after 5 seconds.
    task::block_on(io::timeout(Duration::from_secs(5), async {
        let stdin = io::stdin();

        // Read a line from the standard input and display it.
        let mut line = String::new();
        stdin.read_line(&mut line).await?;
    Prikaži ovu nit

Čini se da učitavanje traje već neko vrijeme.

Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.

    Možda bi vam se svidjelo i ovo:

    ·