make buffer creation TS lock-free