Skip to content

Commit 65a8620

Browse files
committed
add more examples
1 parent 5dfaac0 commit 65a8620

File tree

19 files changed

+175
-9
lines changed

19 files changed

+175
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[workspace]
2-
members = ["thread", "pool", "asyncwait", "primitive", "collections", "process", "syncs", "channel","parking_lot_examples", "crossbeam_examples", "special"]
2+
members = ["thread", "pool", "asyncwait", "primitive", "collections", "process", "syncs", "channel", "timer_examples", "parking_lot_examples", "crossbeam_examples", "rayon_examples", "tokio_examples", "special"]

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
## chapter 2: Thread Pool
77

8-
## chapter 3: async
8+
## chapter 3: async/.await
99

1010
## chapter 4: synchronization primitives
1111

@@ -15,13 +15,15 @@
1515

1616
## chapter 7: channel
1717

18-
## chapter 8: parking_lot
18+
## chapter 8: timer/ticker
1919

20-
## chapter 9: crossbeam
20+
## chapter 9: parking_lot
2121

22-
## chapter 10: xxxx
22+
## chapter 10: crossbeam
2323

24-
## chapter 11: xxxx
24+
## chapter 11: rayon
25+
26+
## chapter 12: tokio
2527

2628
## chapter n: special
2729

rayon_examples/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[package]
2+
name = "rayon_examples"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]

rayon_examples/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

special/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
pub mod oslock;
2+
pub mod oneshot;
3+
pub mod map;
24

3-
pub use oslock::*;
5+
pub use oslock::*;
6+
pub use oneshot::*;
7+
pub use map::*;

special/src/map.rs

Whitespace-only changes.

special/src/mco.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// singleflight
2+
// async-singleflight

special/src/oneshot.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// oneshot
2+
// catty

special/src/primitive.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Mutex
2+
// RWLock
3+
// wg
4+
// async-xxx
5+
// awaitgroup
6+
// usync
7+
8+
9+
// waitfor
10+
11+
// atomig
12+
// atomicbox

special/src/scc.rs

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

0 commit comments

Comments
 (0)