MCPcopy Index your code
hub / github.com/SSheldon/rust-dispatch / test_serial_queue_async

Function test_serial_queue_async

src/queue.rs:374–383  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

372
373 #[test]
374 fn test_serial_queue_async() {
375 let q = Queue::create("", QueueAttribute::Serial);
376 let num = Arc::new(Mutex::new(0));
377
378 async_increment(&q, &num);
379
380 // Sync an empty block to ensure the async one finishes
381 q.exec_sync(|| ());
382 assert_eq!(*num.lock().unwrap(), 1);
383 }
384
385 #[test]
386 fn test_after() {

Callers

nothing calls this directly

Calls 2

exec_syncMethod · 0.80
async_incrementFunction · 0.70

Tested by

no test coverage detected