added lend_thread to worker task; use std::mutex instead of ACE mutex for locking