Skip to content
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

Add checks to config #57

Merged
merged 2 commits into from Mar 28, 2020
Merged

Add checks to config #57

merged 2 commits into from Mar 28, 2020

Conversation

Max-Meldrum
Copy link
Contributor

As I noticed things may go very wrong if you are dumb and set threads/throughput to 0.

And for the num_cpus change:
rust-lang/futures-rs#1835

@Bathtor
Copy link
Contributor

Bathtor commented Mar 28, 2020

Please add some helpful error messages to these assertions.

Also, what happens if someone actually does want an empty thread pool and run everything dedicated for some reason. We should probably support this. Maybe with a special Scheduler implementation that throws exceptions on every scheduling attempt, so things don’t just quietly not work?

@Max-Meldrum
Copy link
Contributor Author

Okay, will add error messages.

Well, if the threads is set to 0, the executors crate will panic as it has a check that threads > 0 when creating the pool.

@Bathtor Bathtor merged commit 8f0f026 into kompics:master Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants