Implement shared FIFO execution queue for Async/H2 client#776
Implement shared FIFO execution queue for Async/H2 client#776arturobernalg wants to merge 1 commit 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
| }, | ||
| exchangeHandler::cancel); | ||
|
|
||
| return () -> { |
There was a problem hiding this comment.
@arturobernalg Can be simplified as complexCancellable.setDependency(queued)
| }, | ||
| exchangeHandler::cancel); | ||
|
|
||
| return () -> { |
There was a problem hiding this comment.
@arturobernalg Can be simplified as complexCancellable.setDependency(queued)
| * | ||
| * @since 5.7 | ||
| */ | ||
| public final class AsyncSharedClientQueueLocalExample { |
There was a problem hiding this comment.
@arturobernalg Examples are not integration tests. They do not need to be fully functional. They need to be informative and easy to understand. Drop the server side code. If there are any assumptions about the server side functionality, just put a comment about it
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.
| .setMaxConcurrentStreams(256) | ||
| .build(); | ||
|
|
||
| final HttpAsyncServer server = H2ServerBootstrap.bootstrap() |
There was a problem hiding this comment.
@arturobernalg Same here. Drop all server side code. Use nghttp2.org
a6c0950 to
29a0fb1
Compare
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.
cf01866 to
c431769
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.