Add concurrent caller location test

This commit is contained in:
JCTyBlaidd 2020-12-07 21:13:11 +00:00 committed by JCTyblaidd
parent c4ccd0b6a1
commit fbe7fbb890
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,17 @@
use std::thread::spawn;
use std::panic::Location;
fn initialize() {
let _ignore = initialize_inner();
}
fn initialize_inner() -> &'static Location<'static> {
Location::caller()
}
fn main() {
let j1 = spawn(initialize);
let j2 = spawn(initialize);
j1.join().unwrap();
j2.join().unwrap();
}

View File

@ -0,0 +1,2 @@
warning: thread support is experimental and incomplete: weak memory effects are not emulated.