Locking with the process context