basic joinable thread test

This commit is contained in:
Michael Ploujnikov 2010-02-03 17:06:27 -05:00
parent bd6ed5aa88
commit 48829bc9ad
2 changed files with 17 additions and 0 deletions

View file

@ -36,6 +36,9 @@ err: result is 0
err: value is 84
END
TEST "joinable thread" joinable-thread <<END
END
TEST "sync joinable" sync-joinable <<END
err: syncing with the master thread
err: the master thread received its arguments

View file

@ -309,6 +309,20 @@ TEST ("sync-many")
lumiera_threadpool_destroy ();
}
TEST ("joinable-thread")
{
int delay = 10000;
lumiera_threadpool_init ();
LumieraThread t = lumiera_thread_run (LUMIERA_THREADCLASS_IDLE
| LUMIERA_THREAD_JOINABLE,
&sleep_fn,
(void *)&delay,
"joinable idle thread",
&NOBUG_FLAG (test));
lumiera_thread_join(t);
lumiera_threadpool_destroy ();
}
TEST ("sync-joinable")
{
lumiera_threadpool_init ();