]> Piment Noir Git Repositories - freqai-strategies.git/commit
fix(quickadapter): prevent best-params lock hang on FIFO paths (#191)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 30 Jul 2026 20:50:13 +0000 (22:50 +0200)
committerGitHub <noreply@github.com>
Thu, 30 Jul 2026 20:50:13 +0000 (22:50 +0200)
commit7d1a937b9f4ca9913eb19d32e6b1c27583a37712
tree66d0744e0fdecb0a8bf5d3a704a9e0af7137f1ed
parentb1122863c8ec0e002040fd20dbb068784533c44e
fix(quickadapter): prevent best-params lock hang on FIFO paths (#191)

Open the best-params lock with O_NONBLOCK so a pre-existing FIFO at
.optuna-best-params.lock no longer blocks the O_RDONLY shared-load open
until a writer appears (O_NOFOLLOW rejects symlinks but not FIFOs),
hanging strategy startup before the S_ISREG guard can reject the
non-regular file. The flag is inert on regular files and does not affect
the subsequent blocking flock() (governed by LOCK_NB, not the fd flag).

Addresses the unresolved P2 review thread on merged PR #185.
quickadapter/user_data/strategies/Utils.py