threadpool test + rag's fix
oops made a small mistake, fixed
added rag's shit + tests
fixed synchronization error
merged with lewbranch