carllerche / syncbox

Concurrency utilities for Rust
131 stars 14 forks source link

Tell the user how to have a Threadpool in a struct #24

Closed posix4e closed 2 years ago

posix4e commented 9 years ago

When including a threadpool in a struct there's lots of complexity

To learn more, run the command again with --verbose. posix4e@posix4e-P27GV2:~/projects/wal$ rust-style -w src/lib.rs ; cargo test Compiling wal v0.1.0 (file:///home/posix4e/projects/wal) src/lib.rs:15:11: 15:21 error: wrong number of type arguments: expected at least 1, found 0 [E0243] src/lib.rs:15 pool: ThreadPool ^~~~~~ src/lib.rs:15:11: 15:21 help: run rustc --explain E0243 to see a detailed explanation error: aborting due to previous error src/lib.rs:15:11: 15:21 error: wrong number of type arguments: expected at least 1, found 0 [E0243] src/lib.rs:15 pool: ThreadPool ^~~~~~

I am not even sure how to template all of this. We should provide an example.

carllerche commented 9 years ago

Good point :) I will try to add some docs tonight.