Commit c46fb6f
fix: Cancel _target task in AsyncWorker.kill() and improve sync close()
- AsyncWorker.kill() now calls self._task.cancel() before clearing the
reference, preventing duplicate consumers if submit() is called later
- close() with AsyncHttpTransport now does best-effort sync cleanup
(kill transport, close components) instead of silently returning
- flush()/close() log warnings instead of debug when async transport used
- Add __aenter__/__aexit__ to _Client for 'async with' support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 4b77519 commit c46fb6f
2 files changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
1045 | | - | |
1046 | | - | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1047 | 1049 | | |
1048 | | - | |
1049 | | - | |
| 1050 | + | |
| 1051 | + | |
1050 | 1052 | | |
1051 | 1053 | | |
1052 | 1054 | | |
| |||
1092 | 1094 | | |
1093 | 1095 | | |
1094 | 1096 | | |
1095 | | - | |
1096 | | - | |
| 1097 | + | |
| 1098 | + | |
1097 | 1099 | | |
1098 | 1100 | | |
1099 | 1101 | | |
| |||
1136 | 1138 | | |
1137 | 1139 | | |
1138 | 1140 | | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1139 | 1147 | | |
1140 | 1148 | | |
1141 | 1149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
216 | 218 | | |
217 | 219 | | |
218 | 220 | | |
| |||
0 commit comments