fixed bug of thread module for slib
add unit test for thread module of slib