Remove process_document lock

Allow user to manage locking by themselves