Added writer lock