added some checks to lumiera_threadpool_release_thread(), maybe too much modified thread_loop() to return a known value - 0 added checks to lumiera_thread_new() added a check to lumiera_thread_destroy() made lumiera_thread_destroy() unlink the thread from a pool list updated test case to match new debug messages
47 lines
1.1 KiB
Text
47 lines
1.1 KiB
Text
|
|
TESTING "Thread Pools" ./test-threadpool
|
|
|
|
PLANNED "create"
|
|
PLANNED "yield"
|
|
PLANNED "cancel"
|
|
|
|
TEST "Acquire/Release test" basic-acquire-release <<END
|
|
err: start by initializing the threadpool
|
|
err: acquiring thread 1
|
|
err: acquiring thread 2
|
|
err: releasing thread 1
|
|
err: thread 1 has been released
|
|
err: releasing thread 2
|
|
err: thread 2 has been released
|
|
err: destroying threadpool
|
|
|
|
err: destroying individual pool #0
|
|
err: number of threads in the pool=1
|
|
err: deleting thread
|
|
err: destroying thread
|
|
err: destroying the pool mutex
|
|
err: pool mutex destroyed
|
|
|
|
err: destroying individual pool #1
|
|
err: number of threads in the pool=0
|
|
err: destroying the pool mutex
|
|
err: pool mutex destroyed
|
|
|
|
err: destroying individual pool #2
|
|
err: number of threads in the pool=0
|
|
err: destroying the pool mutex
|
|
err: pool mutex destroyed
|
|
|
|
err: destroying individual pool #3
|
|
err: number of threads in the pool=0
|
|
err: destroying the pool mutex
|
|
err: pool mutex destroyed
|
|
|
|
err: destroying individual pool #4
|
|
err: number of threads in the pool=1
|
|
err: deleting thread
|
|
err: destroying thread
|
|
err: destroying the pool mutex
|
|
err: pool mutex destroyed
|
|
END
|
|
|