Race Conditions

I’m sorry I’m trying to understand how this serial queue code will solve the 2 threads issue
Screen Shot 2021-05-30 at 8.00.54 AM

if the problem is all about that the second thread has started one clock cycle before the first thread, then I could imagine that these are the tasks that will be in the threadSafeCountQueue
Screen Shot 2021-05-30 at 8.05.18 AM

and that will result in wrong value too