multi-thread supported

make level associate with current thread id.