extract buffer operation from worker_thread