Herbie icon indicating copy to clipboard operation
Herbie copied to clipboard

`Path().exists()` needs a timeout in some cases

Open blaylockbk opened this issue 2 years ago • 0 comments

If the save_dir Path is a network drive or other path that is currently not available, then Path().exists() will never resolve the path and run forever.

There is an answer on StackOverflow for how to make a custom TimeoutPath class to implement a timeout feature so the exists() method will return False if the Path().exists() doesn't finish quickly. I don't know if I really need to implement this in Herbie because it adds some complexity for a case that is not usually a problem 99.99% of the time, but if I keep running into the issue I might add it.

blaylockbk avatar Feb 06 '23 18:02 blaylockbk