On Mon Jun 23 09:26:55 2025 +0000, Mike Kozelkov wrote:
Another thread may keep open file with given name for reading/writing, so we have to wait some time for file availability or fail if the number of attempts is exceeded
The usual approach is to fail immediately. If the caller intends to wait in such cases, it can do so by retrying on its own. Sleeping inside a function that's otherwise non-blocking doesn't seem appropriate.