We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99182dd commit 0ad4dd4Copy full SHA for 0ad4dd4
library/std/src/thread/tests.rs
@@ -244,6 +244,28 @@ fn test_try_panic_any_message_unit_struct() {
244
}
245
246
247
+#[test]
248
+fn test_park_unpark_before() {
249
+ for _ in 0..10 {
250
+ thread::current().unpark();
251
+ thread::park();
252
+ }
253
+}
254
+
255
256
+fn test_park_unpark_called_other_thread() {
257
258
+ let th = thread::current();
259
260
+ let _guard = thread::spawn(move || {
261
+ super::sleep(Duration::from_millis(50));
262
+ th.unpark();
263
+ });
264
265
266
267
268
269
#[test]
270
fn test_park_timeout_unpark_before() {
271
for _ in 0..10 {
0 commit comments