buffer redesign for lock-free multithreading support