We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
available_parallelism()
1 parent 9b735a7 commit 8af12ebCopy full SHA for 8af12eb
src/test/ui/thread-available_parallelism.rs
@@ -0,0 +1,12 @@
1
+// run-pass
2
+// this is an ignore list on purpose so that new platforms don't miss it:
3
+//ignore-vxworks
4
+//ignore-redox
5
+//ignore-l4re
6
+
7
+// check that std::thread::available_parallelism returns a valid value
8
9
+fn main() {
10
+ std::thread::available_parallelism().expect(
11
+ "should return a value on all platforms that are not ignored");
12
+}
0 commit comments