How do you handle race conditions and thread synchronization without severely degrading system performance at NDA?