Implement shared FIFO execution queue for Async/H2 client#776
Implement shared FIFO execution queue for Async/H2 client#776arturobernalg wants to merge 2 commits intoapache:masterfrom
Conversation
369c6db to
97067f4
Compare
|
@arturobernalg Please rebase this change-set whenever you have a minute |
42909c4 to
964f1ae
Compare
@ok2c done |
964f1ae to
fe239e5
Compare
ok2c
left a comment
There was a problem hiding this comment.
@arturobernalg Lookd good overall.
e315c7a to
86b2bed
Compare
@ok2c please do one last pass |
ok2c
left a comment
There was a problem hiding this comment.
@arturobernalg Just a few minor tweaks.
cf01866 to
c431769
Compare
|
@arturobernalg |
Introduce one shared per-client queue to cap concurrently executing requests and enqueue overflow. Ensure queued starts release the slot on any terminal path, including synchronous start failures.
8e05e36 to
58cec36
Compare
|
@arturobernalg I think we may have overlooked one important detail. What is going to happen if the client gets shut down and there are still pending requests stuck in the execution queue. We need to make sure those requests get properly cancelled. |
@ok2c |
| private static final int STARTED = 1; | ||
| private static final int CANCELLED = 2; | ||
|
|
||
| private static final AtomicIntegerFieldUpdater<Entry> STATE_UPDATER = |
There was a problem hiding this comment.
@arturobernalg Is there a reason you reverted your implementation back to AtomicIntegerFieldUpdater?
1f2ea10 to
e8c6f46
Compare
Add a shared FIFO execution queue to cap concurrently executing async requests per client instance. Queue overflow requests and execute them when in-flight execution completes. Ensure queue slots are released on all terminal paths, including synchronous start failures.