Make the "threads" test run faster.

Resolves #218.