implement real time lock for producer