@Jacob Pratt You are correct, though this behaviour is surprising to me. I am still very much a Rust newbie. Can you elaborate on what makes getting the local UtcOffset not threadsafe in such an environment?
Basically, environment variables are inherently thread-unsafe per the POSIX standard. Some operating systems voluntarily provide thread-safe implementations, and those OS's are exempted from the check. It's not anything Rust specific.
Devon Morris
in reply to Jonathan Lamothe • • •Content warning: Rust question
I bet it has something to do with https://docs.rs/time/0.3.36/src/time/sys/local_offset_at/unix.rs.html#144
Is your `main.rs` single-threaded?
unix.rs - source
docs.rsJonathan Lamothe
in reply to Devon Morris • •Content warning: Rust question
Mo :ferris: :tux:
in reply to Jonathan Lamothe • • •Jacob Pratt
in reply to Mo :ferris: :tux: • • •Jonathan Lamothe
in reply to Jacob Pratt • •UtcOffset
not threadsafe in such an environment?Jacob Pratt
in reply to Jonathan Lamothe • • •Sorry, didn't get the ping.
Basically, environment variables are inherently thread-unsafe per the POSIX standard. Some operating systems voluntarily provide thread-safe implementations, and those OS's are exempted from the check. It's not anything Rust specific.
Jonathan Lamothe
in reply to Jacob Pratt • •UtcOffset
to be manually specified.