Skip to content

Commit f578a33

Browse files
committed
init commet
0 parents  commit f578a33

6 files changed

Lines changed: 451 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

Cargo.lock

Lines changed: 307 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[package]
2+
name = "excutor"
3+
version = "0.1.0"
4+
authors = ["hooper.hu <hooper.hu@trantect.com>"]
5+
edition = "2018"
6+
7+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
9+
[dependencies]
10+
crossbeam-channel = "0.5"
11+
futures = "0.3"
12+
atomic-waker = "1.0"

src/main.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
pub mod simple_excutor;
2+
pub mod simple_future;
3+
4+
use std::time::Duration;
5+
use simple_future::TimerFuture;
6+
7+
fn main() {
8+
println!("Hello, world!");
9+
let (executor, spawner) = simple_excutor::new_executor_and_spawner();
10+
spawner.spawn(async {
11+
println!("howdy!");
12+
TimerFuture::new(Duration::new(2, 0)).await;
13+
println!("done!");
14+
});
15+
drop(spawner);
16+
executor.run();
17+
}

0 commit comments

Comments
 (0)