We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Thread
1 parent b5d8108 commit e277f01Copy full SHA for e277f01
library/std/src/sys/unix/locks/queue_rwlock.rs
@@ -210,7 +210,8 @@ impl Node {
210
fn prepare(&mut self) {
211
// Fall back to creating an unnamed `Thread` handle to allow locking in
212
// TLS destructors.
213
- self.thread.get_or_init(|| thread_info::current_thread().unwrap_or(Thread::new(None)));
+ self.thread
214
+ .get_or_init(|| thread_info::current_thread().unwrap_or_else(|| Thread::new(None)));
215
self.completed = AtomicBool::new(false);
216
}
217
0 commit comments