-
best learning materials
为rust crates.io换上国内中科大的源
vi ~/.cargo/config
[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
concept | rust implementation |
---|---|
parallelism | rayon |
Concurrency | async/await |
Channel | Rust allows you to transfer a pointer from one thread to another to avoid racing conditions for resources. Through passing pointers, Rust can enforce thread isolation for channels: fearless concurrency |
Lock | Data is only accessible when the lock is held. fearless concurrency |