ThreadSafe library