tree thread-safe done