[Fix] Clean up shutdown routine for ClusterExecutors#920
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughCentralizes shutdown branching in Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Executor
participant Shutdown as _shutdown_executor
participant Futures as FutureDict
participant Procs as Processes
participant Mem as MemoryDict
participant Q as Queue
Client->>Shutdown: shutdown(wait?, cancel_futures?)
alt cancel_futures == true
Shutdown->>Futures: _cancel_futures(future_dict)
end
alt process cancellation required
Shutdown->>Procs: _cancel_processes()
end
alt wait == true
loop refresh until empty
Shutdown->>Mem: _refresh_memory_dict()
end
else wait == false
Shutdown->>Mem: _refresh_memory_dict()
end
Shutdown->>Q: task_done()
Shutdown->>Q: join()
Shutdown-->>Client: done
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #920 +/- ##
==========================================
+ Coverage 93.79% 93.83% +0.03%
==========================================
Files 38 38
Lines 1951 1962 +11
==========================================
+ Hits 1830 1841 +11
Misses 121 121 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary by CodeRabbit