adding writing queue (prod/cons)