Multithreading example with logic error. Race condition occurs due to lack of synchronization between threads.