LUMIERA.clone/tests/30backend-threadpool.tests
Michael Ploujnikov 73f1bbae2a added two sync tests
one with a single thread and one with 100 randomly sleeping ones
2010-02-02 20:44:35 -05:00

39 lines
780 B
Text

TESTING "Thread Pools" ./test-threadpool
PLANNED "create"
PLANNED "yield"
PLANNED "cancel"
TEST "Most basic threadpool test" threadpool-basic <<END
END
TEST "process a function" process-function <<END
err: the input to the function is
err: the result is 1
END
TEST "acquire two threads" two-thread-acquire <<END
err: start by initializing the threadpool
err: acquiring thread 1
err: acquiring thread 2
err: thread 1 state=IDLE
err: thread 2 state=IDLE
err: cleaning up
END
TEST "many sleepy threads" many-sleepy-threads <<END
END
TEST "simple sync" simple-sync <<END
err: syncing with the other thread
err: the other thread received its arguments
err: result is 0
END
TEST "sync many" sync-many <<END
err: result is 0
err: value is 84
END
PLANNED "error cleared on join"