#promise #thread-pool #adaptive #abyss #resolve #duration #sleep

abyss-promise

[abyss] A simple promise implementation with adaptive threadpool support

3 unstable releases

0.2.0 Feb 5, 2022
0.1.1 Dec 16, 2021
0.1.0 Dec 16, 2021

#634 in Concurrency

27 downloads per month

MIT/Apache

14KB
305 lines

This is a simple promise implementation with an adaptive threadpool.

Usage:

use abyss_promise::Promise;

let promise = Promise::new(|promise| {
    std::thread::sleep(std::time::Duration::from_millis(100));
    promise.resolve(0);
});

assert_eq!(promise.resolve(), Some(0));

Dependencies

~0.8–6.5MB
~19K SLoC