Buffer threadsafe