Thread managment and safety.