Conversation
|
Claude finished @ZanCorDX's task in 2m 58s —— View job PR Review: Earlier exit for sim thread
SummaryThe intent is sound — checking Issue found
|
| // Avoid starting sims when the output channel is closed. | ||
| if current_sim_context.results.is_closed() { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Bug: return here kills the worker thread permanently. The 'main loop in run_sim_worker is designed to keep workers alive across block boundaries — they wait for a new SimulationContext after the current one is done. When results.is_closed() (i.e. the SimulationJob dropped its receiver because the block ended), the worker should go back to 'main to pick up the next block's context, not exit.
After this change, each time a block ends, any worker that happens to dequeue a request after the results channel closes would be permanently lost. Over time this drains the worker pool.
Should be break instead of return — that exits the inner while loop and naturally falls through to the next 'main iteration, consistent with the existing exit path when requests.recv() returns Err.
|
Claude finished @ZanCorDX's task in 1m 37s —— View job PR Review: Earlier exit for sim thread (re-review after fix)
SummaryThe previous review's concern (
Comment ( No issues to flag. |
📝 Summary
This changes makes the sim thread finish as soon as the block ends.
💡 Motivation and Context
Saw on a test version lots of sims happening after the block ended.
✅ I have completed the following steps:
make lintmake test