multi-threading-safe write buffer.