Future<void> write(T x) async { await _writeLock.synchronized(() async { await _ex.exchange(x); }); }