MCPcopy Index your code
hub / github.com/RustPython/RustPython / drop

Method drop

crates/vm/src/stdlib/_thread.rs:900–907  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

898
899 impl Drop for LocalGuard {
900 fn drop(&mut self) {
901 if let Some(local_data) = self.local.upgrade() {
902 // Remove from map while holding the lock, but drop the value
903 // outside the lock to prevent deadlock if __del__ accesses _local
904 let removed = local_data.data.lock().remove(&self.thread_id);
905 drop(removed);
906 }
907 }
908 }
909
910 // Shared data structure for Local

Callers

nothing calls this directly

Calls 3

upgradeMethod · 0.45
removeMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected