Commit df3f751
committed
stub: ensure BlockingClientCall tasks to run even after cancellation
After canceling a `BlockingClientCall`, the caller may not interact with it further. That means the call executor, a `ThreadSafeThreadlessExecutor`, will not execute any more tasks. There may still be tasks submitted to the call executor, though, until the underlying call completes. Some of these tasks (e.g., server messages available) may leak native resources unless executed. So, we convert the executor to a "direct" executor during cancellation in order to ensure all call tasks run.
Fixes #12355.1 parent 9cddcb4 commit df3f751
File tree
2 files changed
+30
-2
lines changed- stub/src/main/java/io/grpc/stub
2 files changed
+30
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
252 | 259 | | |
253 | 260 | | |
254 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
871 | 871 | | |
872 | 872 | | |
873 | 873 | | |
| 874 | + | |
874 | 875 | | |
875 | 876 | | |
876 | 877 | | |
| |||
950 | 951 | | |
951 | 952 | | |
952 | 953 | | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
953 | 965 | | |
954 | 966 | | |
955 | 967 | | |
| |||
975 | 987 | | |
976 | 988 | | |
977 | 989 | | |
| 990 | + | |
978 | 991 | | |
979 | 992 | | |
980 | | - | |
981 | | - | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
982 | 999 | | |
983 | 1000 | | |
984 | 1001 | | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
985 | 1006 | | |
986 | 1007 | | |
987 | 1008 | | |
| |||
0 commit comments