Move some things to std::sync::poison and reexport them in std::sync

This commit is contained in:
Pavel Grigorenko 2024-12-23 19:36:41 +03:00
parent 41b579660c
commit ee2ad4dfb1
21 changed files with 141 additions and 37 deletions

View file

@ -9,7 +9,7 @@
// cdb-command:g
//
// cdb-command:dx m,d
// cdb-check:m,d [Type: std::sync::mutex::Mutex<i32>]
// cdb-check:m,d [Type: std::sync::poison::mutex::Mutex<i32>]
// cdb-check: [...] inner [Type: std::sys::sync::mutex::futex::Mutex]
// cdb-check: [...] poison [Type: std::sync::poison::Flag]
// cdb-check: [...] data : 0 [Type: core::cell::UnsafeCell<i32>]
@ -21,8 +21,8 @@
//
// cdb-command:dx _lock,d
// cdb-check:_lock,d : Ok [Type: enum2$<core::result::Result<std::sync::mutex::MutexGuard<i32>,enum2$<std::sync::poison::TryLockError<std::sync::mutex::MutexGuard<i32> > > > >]
// cdb-check: [...] __0 [Type: std::sync::mutex::MutexGuard<i32>]
// cdb-check:_lock,d : Ok [Type: enum2$<core::result::Result<std::sync::poison::mutex::MutexGuard<i32>,enum2$<std::sync::poison::TryLockError<std::sync::poison::mutex::MutexGuard<i32> > > > >]
// cdb-check: [...] __0 [Type: std::sync::poison::mutex::MutexGuard<i32>]
use std::sync::Mutex;

View file

@ -9,12 +9,12 @@
// cdb-command:g
//
// cdb-command:dx l
// cdb-check:l [Type: std::sync::rwlock::RwLock<i32>]
// cdb-check:l [Type: std::sync::poison::rwlock::RwLock<i32>]
// cdb-check: [...] poison [Type: std::sync::poison::Flag]
// cdb-check: [...] data : 0 [Type: core::cell::UnsafeCell<i32>]
//
// cdb-command:dx r
// cdb-check:r [Type: std::sync::rwlock::RwLockReadGuard<i32>]
// cdb-check:r [Type: std::sync::poison::rwlock::RwLockReadGuard<i32>]
// cdb-check: [...] data : NonNull([...]: 0) [Type: core::ptr::non_null::NonNull<i32>]
// cdb-check: [...] inner_lock : [...] [Type: std::sys::sync::rwlock::futex::RwLock *]

View file

@ -9,8 +9,8 @@
// cdb-command:g
//
// cdb-command:dx w
// cdb-check:w [Type: std::sync::rwlock::RwLockWriteGuard<i32>]
// cdb-check: [...] lock : [...] [Type: std::sync::rwlock::RwLock<i32> *]
// cdb-check:w [Type: std::sync::poison::rwlock::RwLockWriteGuard<i32>]
// cdb-check: [...] lock : [...] [Type: std::sync::poison::rwlock::RwLock<i32> *]
// cdb-check: [...] poison [Type: std::sync::poison::Guard]
#[allow(unused_variables)]