We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ff10ed commit 1562614Copy full SHA for 1562614
1 file changed
compio-runtime/tests/panic.rs
@@ -14,3 +14,19 @@ fn panic_spawn() {
14
panic!("another panic");
15
})
16
}
17
+
18
+#[test]
19
+#[should_panic]
20
+#[cfg_attr(feature = "sanitize", cfg_attr(sanitize = "address", ignore))]
21
+fn simple_drop() {
22
+ compio_runtime::Runtime::new().unwrap().block_on(async {
23
+ let handle = compio_runtime::spawn(async {
24
+ sleep(Duration::from_millis(100)).await;
25
+ });
26
+ // Register the waker for handle here to make sure that when the task gets
27
+ // dropped, `has_waker` check returns true
28
+ compio_runtime::spawn(handle).detach();
29
30
+ panic!("Main future panics");
31
+ })
32
+}
0 commit comments