simplify background writer thread implementation, tying the sync object lifetime more closely to the thread object lifetime