xorbitsai / xoscar

Python actor framework for heterogeneous computing.
https://xoscar.dev
Apache License 2.0
112 stars 23 forks source link

BUG: Fix leaking clients in actor caller #115

Closed codingl2k1 closed 4 days ago

codingl2k1 commented 6 days ago

Background: If an actor is called from a thread and the thread exits after the call, the client will leak in the actor caller, and the corresponding channel will still be open.

This PR auto close the actor callers and channels that belongs to the exited thread.

What do these changes do?

Related issue number

Fixes #xxxx

Check code requirements

codecov[bot] commented 6 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.76%. Comparing base (d6465c9) to head (fca334a). Report is 20 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #115 +/- ## ========================================== - Coverage 88.97% 84.76% -4.22% ========================================== Files 48 53 +5 Lines 4038 4626 +588 Branches 770 503 -267 ========================================== + Hits 3593 3921 +328 - Misses 358 603 +245 - Partials 87 102 +15 ``` | [Flag](https://app.codecov.io/gh/xorbitsai/xoscar/pull/115/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xorbitsai) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/xorbitsai/xoscar/pull/115/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xorbitsai) | `84.54% <ø> (-4.27%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=xorbitsai#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.