add command buffer, thread safe