2007-08-21 17:33:19 +02:00
|
|
|
|
2009-11-24 01:05:57 +01:00
|
|
|
TESTING "Thread Pools" ./test-threadpool
|
2007-08-21 17:33:19 +02:00
|
|
|
|
|
|
|
|
PLANNED "create"
|
|
|
|
|
PLANNED "yield"
|
|
|
|
|
PLANNED "cancel"
|
2009-11-24 01:05:57 +01:00
|
|
|
|
2009-12-23 19:10:31 +01:00
|
|
|
TEST "Most basic threadpool test" threadpool-basic <<END
|
2009-11-25 23:43:22 +01:00
|
|
|
END
|
2009-11-26 03:46:03 +01:00
|
|
|
|
2009-12-23 19:10:31 +01:00
|
|
|
TEST "process a function" process-function <<END
|
2010-01-18 18:16:45 +01:00
|
|
|
err: the input to the function is
|
2010-01-20 13:54:26 +01:00
|
|
|
err: the result is 1
|
2009-11-26 03:46:03 +01:00
|
|
|
END
|
2010-01-17 17:34:23 +01:00
|
|
|
|
2010-01-26 22:58:30 +01:00
|
|
|
TEST "acquire two threads" two-thread-acquire <<END
|
2010-01-30 04:01:48 +01:00
|
|
|
err: start by initializing the threadpool
|
2010-01-26 22:58:30 +01:00
|
|
|
err: acquiring thread 1
|
|
|
|
|
err: acquiring thread 2
|
|
|
|
|
err: thread 1 state=IDLE
|
|
|
|
|
err: thread 2 state=IDLE
|
|
|
|
|
err: cleaning up
|
|
|
|
|
END
|
|
|
|
|
|
2010-01-30 04:12:09 +01:00
|
|
|
TEST "many sleepy threads" many-sleepy-threads <<END
|
|
|
|
|
END
|
|
|
|
|
|
2010-02-01 23:02:24 +01:00
|
|
|
TEST "simple sync" simple-sync <<END
|
|
|
|
|
err: syncing with the other thread
|
|
|
|
|
err: result is 0
|
|
|
|
|
END
|
|
|
|
|
|
2010-03-04 16:23:57 +01:00
|
|
|
# Broken, needs better test drive (planned features for dispatching output)
|
|
|
|
|
PLANNED "sync many" sync-many <<END
|
|
|
|
|
err(worker_): result is 0
|
|
|
|
|
err(thread_1): value is 84
|
2010-02-01 23:02:24 +01:00
|
|
|
END
|
|
|
|
|
|
2010-02-03 23:06:27 +01:00
|
|
|
TEST "joinable thread" joinable-thread <<END
|
|
|
|
|
END
|
|
|
|
|
|
2011-05-20 19:42:29 +02:00
|
|
|
PLANNED "sync joinable" sync-joinable <<END
|
2010-02-03 14:02:41 +01:00
|
|
|
END
|
|
|
|
|
|
2010-01-17 17:34:23 +01:00
|
|
|
PLANNED "error cleared on join"
|