task locking/unlocking