How do you manage multithreading in your applications, and what are the risks associated with race conditions?