add threadlocal and daemon thread