mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-11-23 03:39:51 +00:00
improved dispatch testing
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@126 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
parent
af702c4816
commit
e594595bf0
@ -25,10 +25,13 @@
|
||||
pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
|
||||
int testnum;
|
||||
|
||||
void test_countdown(void);
|
||||
|
||||
void
|
||||
say_hello(void *arg)
|
||||
{
|
||||
puts("hello");
|
||||
test_countdown();
|
||||
}
|
||||
|
||||
void
|
||||
@ -67,7 +70,7 @@ test_timer()
|
||||
}
|
||||
|
||||
void
|
||||
test_countdown()
|
||||
test_countdown(void)
|
||||
{
|
||||
dispatch_apply_f(15,
|
||||
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0),
|
||||
@ -87,8 +90,7 @@ main(int argc, char **argv)
|
||||
argc--;
|
||||
}
|
||||
|
||||
//test_timer();
|
||||
test_countdown();
|
||||
test_timer();
|
||||
|
||||
dispatch_main();
|
||||
printf("\n---\n"
|
||||
|
Loading…
Reference in New Issue
Block a user