]> git.saurik.com Git - apple/libdispatch.git/blob - testing/dispatch_api.c
libdispatch-84.5.5.tar.gz
[apple/libdispatch.git] / testing / dispatch_api.c
1 #include <stdlib.h>
2
3 #include "dispatch_test.h"
4
5 void
6 work(void *context __attribute__((unused)))
7 {
8 test_stop();
9 exit(0);
10 }
11
12 int main(void) {
13 test_start("Dispatch (Public) API");
14 dispatch_queue_t q = dispatch_get_main_queue();
15 test_ptr_notnull("dispatch_get_main_queue", q);
16
17 dispatch_async_f(dispatch_get_main_queue(), NULL, work);
18 dispatch_main();
19 return 0;
20 }