Uh oh!
There was an error while loading. Please reload this page.
[path_finder_dev] path_finder Search Priority v2 - #604
Conversation
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
6a49659 to
8ddb806Compare…ty (see updated README.md).
8ddb806 to
2cf3fa2Comparerwgk
commented
May 5, 2025
/ok to test 2b74022 |
|
rwgk
commented
May 5, 2025
/ok to test 27db0a7 |
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
rwgk
commented
May 5, 2025
/ok to test b1a5e9d |
Uh oh!
There was an error while loading. Please reload this page.
The previous implementation checked result_queue.empty() before calling get(), which introduces a classic race condition: the queue may become non-empty immediately after the check, resulting in missed results or misleading errors. This patch replaces the empty() check with result_queue.get(timeout=1.0), allowing the parent process to robustly wait for results with a bounded delay. Also switches from ctx.SimpleQueue() to ctx.Queue() for compatibility with timeout-based get(), which SimpleQueue does not support on Python ≤3.12. Note: The race condition was discovered by Gemini 2.5
Uh oh!
There was an error while loading. Please reload this page.
Tracking the development history of
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
leofang
commented
May 6, 2025
It is pretty awesome that the search priority update also allows us to drop the old Numba code entirely! |
…ority_last() the default.
…returns an incompatible `handle`. Use win32api.LoadLibraryEx() instead to ensure self-consistency.
leofang
left a comment
There was a problem hiding this comment.
Looking good! Several previous discussions on exec and subprocess/multiprocessing are now moot by removing these unused code entirely.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…od. Move run_python_code_safely.py to test/ directory.
rwgk
commented
May 6, 2025
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
* Use win32api.GetModuleFileName() in abs_path_for_dynamic_library(). With this, load_dl_windows.py consistently uses win32api. ctypes is no longer needed, which eliminates the potential for confusion due to different types of handles. * Address review comment #604 (comment) by at-kkraus14 * Rename function run_python_code_safely() → run_in_spawed_child_process() * Change run_in_spawned_child_process() to accept a callable function instead of a string with Python code. * ChatGPT suggestions * Add rethrow as suggested by ChatGPT * Better names: Worker → ChildProcessWrapper, func → target * ChatGPT suggestions * Add minimal test_spawned_process_runner.py as generated by ChatGPT
Continuation of #578
Completely replace
cuda_paths.pyto achieve the desired Search Priority (see updated README.md).Further testing is under #610