1. add Atomic class;
2. move thread tools to thread dir