jhpratt / num_threads

Obtain the number of threads in the current process
https://docs.rs/num_threads
Apache License 2.0
12 stars 7 forks source link

Move tests to standalone binary #14

Closed jhpratt closed 1 year ago

jhpratt commented 1 year ago

Fixes #13

Currently a linker failure for the iOS build. I am unable to reproduce that failure locally (using Linux).

Freaky commented 1 year ago

The macOS linker failure looks identical to https://github.com/rust-lang/rust/issues/105167 - I think the fix would be to bump the Rust version there, or request an older macOS image.

The sleeps are a bit disconcerting - are the thread counts reported by /proc actually potentially out of date, or is Linux just lazy about reaping LWPs?

jhpratt commented 1 year ago

Requesting an older image is a losing battle, as they eventually get turned off in favor of newer images. I can look into checking a higher Rust version in CI, but I'm not sure where to begin on that other than doing a binary search manually.

With regard to the sleeps — I have no idea why they're necessary. The tests pass on my Fedora machine without them, but it failed in CI.

My priorities are elsewhere in the ecosystem at the moment, so feel free to push on this branch and release when ready.