Done with thread synchronization.
Changed UserData structure to help synchronize.