GSA PI lock mechanism while deduplicating files

It seems that GSA PI is not using a locking mechanism when it's deduplicating. So, when my own code wants to access the same files that are being deduplicated at the same time, PI will crash. Can you please check this and let me know where I can find the lock file to make my own code respect PI and avoid writing to the same file when it's being processed?
Thanks a lot!
Comments