optimize SpinLock; change std::bind to lamda in ThreadPoolImpl class