Commit cd07a4e
committed
get-batch: amend abandoned work-item cleanup (part two)
* replace WI `demand` flag with `owned` ownership gate
* let asm() claim ownership before assembling and release it after cleanup
* let abandoned-WI GC clean only unowned work items
* store "WI abandonment" as an error; return it from asm()
* check WI terminal state while waiting on Rx (not only between asm() iters)
- add inline helper to return error(nil)
* treat internal `errStopped` sentinel as quiet asm() termination
---
* part two, prev. commit: 926bdbb
Signed-off-by: Alex Aizman <alex.aizman@gmail.com>1 parent e5d72a8 commit cd07a4e
3 files changed
Lines changed: 208 additions & 95 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
| 114 | + | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
825 | | - | |
| 825 | + | |
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
| |||
878 | 878 | | |
879 | 879 | | |
880 | 880 | | |
881 | | - | |
| 881 | + | |
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
| |||
897 | 897 | | |
898 | 898 | | |
899 | 899 | | |
900 | | - | |
| 900 | + | |
901 | 901 | | |
902 | 902 | | |
903 | 903 | | |
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | | - | |
| 930 | + | |
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
| |||
0 commit comments