We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f23e76e commit 5912dadCopy full SHA for 5912dad
1 file changed
tests/ui/thread-local/spawn-hook-atexit.rs
@@ -0,0 +1,22 @@
1
+// Regression test for https://github.com/rust-lang/rust/issues/138696
2
+//@ run-pass
3
+
4
+#![feature(rustc_private)]
5
6
+extern crate libc;
7
8
+fn main() {
9
+ std::thread::spawn(|| {
10
+ unsafe { libc::atexit(spawn_in_atexit) };
11
+ })
12
+ .join()
13
+ .unwrap();
14
+}
15
16
+extern "C" fn spawn_in_atexit() {
17
18
+ println!("Thread spawned in atexit");
19
20
21
22
0 commit comments