Is there a way to bypass or remove the file lock held by another thread without killing the thread?
I am using a third-party library in my app that is performing
In short, you cannot do anything about the locking of the file by a third-party. You can get away with Richard E's answer above that mentions the utility Unlocker.
Once the third-party opens a file and sets the lock on it, the underlying system will give that third-party a lock to ensure no other process can access it. There are two trains of thought on this.
OpenFile(...)
.Have a look at the podcast here. And have a look here that explains how to do the second option highlighted above, here.
Hope this helps, Best regards, Tom.