Fixed concurrent read/write inconsistence in WriterThread.