added information for multithreading unsafety and an example on how to synchronize threads