Add some tests for some thread related funcs.
Merge pull request #43 from unknownbrackets/thread-funcs

Add some tests for some thread related funcs