operator lock

using operator lock, to prevent cross-thread access to the buffer