Commit graph

20 commits

Author SHA1 Message Date
Michael Ploujnikov
fca6cd786b fix the prime test algorithm
actually test for the output of the function
2010-01-20 07:54:26 -05:00
Michael Ploujnikov
fb61813650 use unsigned long for even more digits! 2010-01-18 12:43:28 -05:00
Michael Ploujnikov
ffdbc7083b use the largest prime that can fit in an it
don't hard-code the number in the test
2010-01-18 12:16:45 -05:00
Christian Thaeter
020908d623 Make threadpool_destroy wait until all threads are finished
adds a state to each threadpool which can be only offline or online.
One can not acquire new threads when the pool is offline.

no need for waits in the teststuite anymore.
2010-01-18 17:53:33 +01:00
Michael Ploujnikov
56cf53adb3 fix compilation 2010-01-07 18:36:51 -05:00
Christian Thaeter
a698128cfc new no-function test, sleep a bit before destroying the threadpool 2009-12-24 01:55:24 +01:00
Michael Ploujnikov
f2406c23a1 bork bork bork
by pulling this you agree to...
2009-12-23 13:10:31 -05:00
Michael Ploujnikov
eedfafb0d0 convert lumiera_thread_state to using the enum string trick and use it in a test 2009-11-29 18:06:14 -05:00
Michael Ploujnikov
fc16de332f convert lumiera_thread_class to using the enum string trick and use it in a test 2009-11-29 17:55:20 -05:00
Michael Ploujnikov
98519c57da reduce the number of threads spawned in tests to avoid EAGAIN errors from pthread_create (at least on my 2.6.31.5-127.fc12.x86_64 Core2Duo T9600 system) 2009-11-27 11:39:23 -05:00
Michael Ploujnikov
99eb790027 rename LUMIERA_THREAD_* to LUMIERA_THREADCLASS_* in enum lumiera_thread_class 2009-11-26 11:21:31 -05:00
Michael Ploujnikov
af80622ef5 begin implementing a 'soft' thread count limit per pool
add LUMIERA_DIE in cases where this soft limit is reached
add LUMIERA_DIE when pthread_create fails to create threads - serious
add a test which tries to break the soft limit
2009-11-26 10:24:18 -05:00
Michael Ploujnikov
bd076e4210 reduce the number of threads spawned in a test 2009-11-26 10:24:18 -05:00
Michael Ploujnikov
07962b5314 add comments about locking in lumiera_threadpool_release_thread()
output the size of the created thread struct
don't print "destroying thread" (lets tests become shorter with repeated matching)
add a test which spans many threads in all pools
2009-11-26 10:24:17 -05:00
Michael Ploujnikov
d6d81f2e44 added lumiera_threadpool_destroy()
added locking and checks to lumiera_threadpool_acquire_thread()
added a nobug flag to threads.c
added lumiera_thread_destroy()
added lumiera_thread_delete()
2009-11-26 10:24:17 -05:00
Michael Ploujnikov
414b8b99c3 updated test passes
fixed problem with copying lists
2009-11-26 10:24:17 -05:00
Michael Ploujnikov
75696986e4 test passes 2009-11-26 10:24:17 -05:00
Michael Ploujnikov
10f79290a1 add lumiera_threadpool_release_thread
make the test compile
change from type to kind
2009-11-26 10:24:17 -05:00
Michael Ploujnikov
9dd838b129 acquire() test started, so far, everything just compiles 2009-11-26 10:24:17 -05:00
Michael Ploujnikov
00eb4eda46 partial code skeleton 2009-11-26 10:24:17 -05:00