Added some tests for threading. One is failing.