Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
26
third-party/vendor/parking_lot/tests/issue_203.rs
vendored
Normal file
26
third-party/vendor/parking_lot/tests/issue_203.rs
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
use parking_lot::RwLock;
|
||||
use std::thread;
|
||||
|
||||
struct Bar(RwLock<()>);
|
||||
|
||||
impl Drop for Bar {
|
||||
fn drop(&mut self) {
|
||||
let _n = self.0.write();
|
||||
}
|
||||
}
|
||||
|
||||
thread_local! {
|
||||
static B: Bar = Bar(RwLock::new(()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn main() {
|
||||
thread::spawn(|| {
|
||||
B.with(|_| ());
|
||||
|
||||
let a = RwLock::new(());
|
||||
let _a = a.read();
|
||||
})
|
||||
.join()
|
||||
.unwrap();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue