-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: add compile time flags to disable rayon #240
Conversation
singlethreading = ["bls12_381/blst-no-threads"] | ||
multithreading = ["maybe_rayon/multithreading"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should standardize this to single-thread
, multi-thread
|
||
impl DASContext { | ||
#[cfg(feature = "multithreading")] | ||
pub fn with_threads( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename this to new
so that when users switch from single to multithread, they just need to modify the number of parameters
thread_pool: Arc<ThreadPool>, | ||
pub prover_ctx: ProverContext, | ||
pub verifier_ctx: VerifierContext, | ||
} | ||
|
||
#[cfg(feature = "multithreading")] | ||
impl Default for DASContext { | ||
fn default() -> Self { | ||
let trusted_setup = TrustedSetup::default(); | ||
const DEFAULT_NUM_THREADS: ThreadCount = ThreadCount::Single; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might make sense to make the default SensibleDefault
and then have that use the global threadpool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In terms of defaults, single-thread, global threadpool and then a feature flag for local threadpool with threadcount might be the best, or just ask users to import threadpool in their own crate and set the threadpool amount themselves
No description provided.