Synchronize threads better when breakpoint is hit