support thread-safe
Merge pull request #6 from guangbin79/thread-safe

support thread-safe