add a two-thread acquire test

currently this results in a deadlock between lumiera_threadpool_destroy() and thread_loop()
This commit is contained in:
Michael Ploujnikov 2010-01-26 16:58:30 -05:00
parent fc15a2ac2c
commit dc87e78590
2 changed files with 12 additions and 8 deletions

View file

@ -13,4 +13,14 @@ err: the input to the function is
err: the result is 1
END
TEST "acquire two threads" two-thread-acquire <<END
err: acquiring thread 1
err: acquiring thread 2
err: thread 1 kind=INTERACTIVE
err: thread 1 state=IDLE
err: thread 2 kind=INTERACTIVE
err: thread 2 state=IDLE
err: cleaning up
END
PLANNED "error cleared on join"

View file

@ -66,7 +66,7 @@ TEST ("threadpool1")
}
TEST ("basic-acquire-release")
TEST ("two-thread-acquire")
{
ECHO("start by initializing the threadpool");
lumiera_threadpool_init();
@ -90,13 +90,7 @@ TEST ("basic-acquire-release")
ECHO("thread 2 state=%s", lumiera_threadstate_names[t2->state]);
CHECK(LUMIERA_THREADSTATE_IDLE == t2->state);
ECHO("releasing thread 1");
//lumiera_threadpool_release_thread(t1);
ECHO("thread 1 has been released");
ECHO("releasing thread 2");
//lumiera_threadpool_release_thread(t2);
ECHO("thread 2 has been released");
ECHO("cleaning up");
lumiera_threadpool_destroy();
}