Added mutex to protect future in KeyValueBuffer.