[R2] add some locks when creating operations on different threads