File sync yielding performed with a lock instead of a sleep.