There was an error while loading. Please reload this page.
1 parent 9ad7a8f commit a55cde5Copy full SHA for a55cde5
1 file changed
serial_test/src/code_lock.rs
@@ -27,10 +27,6 @@ impl LockMap {
27
self.inner.lock().unwrap().get(key).cloned().map(ValueRef)
28
}
29
30
- pub fn contains(&self, key: &str) -> bool {
31
- self.inner.lock().unwrap().contains_key(key)
32
- }
33
-
34
fn get_or_insert(
35
&self,
36
key: &str,
@@ -155,12 +151,6 @@ impl UniqueReentrantMutex {
155
151
156
152
157
153
pub(crate) fn check_new_key(name: &str) {
158
- // Check if a new key is needed. Just need a read lock, which can be done in sync with everyone else
159
- if global_locks().contains(name) {
160
- return;
161
- };
162
163
- // This is the rare path, which avoids the multi-writer situation mostly
164
154
global_locks().get_or_insert(name, || UniqueReentrantMutex::new_mutex(name));
165
166
0 commit comments