rust-executors:一个带有Rust执行任务者的库

时间:2024-04-25 11:18:53
【文件属性】:

文件名称:rust-executors:一个带有Rust执行任务者的库

文件大小:59KB

文件格式:ZIP

更新时间:2024-04-25 11:18:53

Rust

执行者 具有Rust高性能任务执行器的库。 用法 将此添加到您的Cargo.toml : [ dependencies ] executors = " 0.9 " 您可以使用,例如, 安排一些n_jobs在多个n_workers线程,并通过收集结果mpsc::channel 。 use executors :: * ; use executors :: crossbeam_workstealing_pool; use std :: sync :: mpsc :: channel; let n_workers = 4 ; let n_jobs = 8 ; let pool = crossbeam_workstealing_pool :: small_pool (n_workers); let (tx, rx) = channel (); for _ in 0 ..n_jobs {


【文件预览】:
rust-executors-master
----.gitignore(606B)
----executor-performance()
--------Cargo.toml(917B)
--------src()
--------threadinc.sh(359B)
----README.md(10KB)
----codecoverage-local.sh(710B)
----.github()
--------workflows()
--------FUNDING.yml(79B)
----Cargo.toml(64B)
----LICENSE(1KB)
----.clippy.toml(34B)
----executors()
--------Cargo.toml(2KB)
--------tests()
--------src()
--------benches()
--------test-features.sh(2KB)
----rustfmt.toml(1KB)

网友评论