We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d234cf7 commit 101aaa3Copy full SHA for 101aaa3
src/libcore/rt/local_sched.rs
@@ -119,7 +119,7 @@ fn maybe_tls_key() -> Option<tls::Key> {
119
// another thread. I think this is fine since the only action
120
// they could take if it was initialized would be to check the
121
// thread-local value and see that it's not set.
122
- if key != 0 {
+ if key != -1 {
123
return Some(key);
124
} else {
125
return None;
src/rt/rust_builtin.cpp
@@ -830,9 +830,9 @@ rust_get_rt_env() {
830
}
831
832
#ifndef _WIN32
833
-pthread_key_t sched_key;
+pthread_key_t sched_key = -1;
834
#else
835
-DWORD sched_key;
+DWORD sched_key = -1;
836
#endif
837
838
extern "C" void*
0 commit comments