thread-safe planner/destroy