diff --git a/README.md b/README.md index 67dfe62..55a84fc 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,12 @@ For more examples, see [the src/tests directory](https://github.com/PlasmaPower/brute-force/tree/master/src/tests). For documentation on the config or adaptors, see [the docs](https://docs.rs/brute-force). + +## Configuration + +You can change the number of threads used with the environment variable +`BRUTE_FORCE_THREADS`. + +Inside the program, via the Config struct, you can manually override the thread +count or change how often this library checks if a thread should stop. You can +also set a timeout via the `brute_force_with_timeout` function. diff --git a/src/lib.rs b/src/lib.rs index 081615c..3e7719f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,8 +22,8 @@ pub use traits::{Advance, Start}; #[derive(PartialEq, Eq, Debug, Clone, Copy)] pub struct Config { /// Number of threads to use. - /// Falls back on `BRUTE_FORCE_THREADS`, or if that doesn't exist, the - /// number of logical CPU cores. + /// Falls back on the `BRUTE_FORCE_THREADS` environment variable, or if + /// that doesn't exist, the number of logical CPU cores. pub threads: Option, /// The number of iterations to perform between checking if the computation /// is done (or timed out). Defaults to 512.