Adding thread synchronization