Vendor dependencies
Let's see how I like this workflow.
This commit is contained in:
parent
34d1830413
commit
9c435dc440
7500 changed files with 1665121 additions and 99 deletions
26
vendor/parking_lot/tests/issue_203.rs
vendored
Normal file
26
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