Repository navigation
Document thread semantics - #261
Merged
farmdawgnation merged 1 commit intoNov 12, 2026
Merged
farmdawgnation merged 1 commit into
farmdawgnation merged 1 commit into
Conversation
- Add Scaladoc to Http.withConfiguration noting that each executor owns its own AHC client, pool, and threads, so it should be created once, reused, and shut down. - Replace docs/05/00 with a guide to Http executors: the default executor, custom configuration, thread cost, shutdown, and closeAndConfigure. - Add docs/05/a on capping I/O threads, sharing an event loop group and timer across executors, and naming threads. - Move the Scaladoc index to docs/06/00 so it follows the new pages.
[Low impact] The PR appears safe to merge; no actionable issue was established. SummaryThis PR documents how to create, reuse, configure, and shut down
No actionable issues were established. Reviews (1) · Last reviewed commit: "Document Http executor lifecycle and thr..." · Reviewed by Greptile |
farmdawgnation
deleted the
farmdawgnation/investigate-different-thread-allocation-semantic
branch
November 12, 2026 03:27
There was a problem hiding this comment.
🟡 Changes recommended
The example uses Netty APIs unavailable in the documented dependency set and therefore fails to compile, while the client initialization and thread-ownership descriptions also need correction.
2 open issues
What changed in this PR
This documentation-focused PR explains how Dispatch HTTP executors allocate and manage resources, helping users reuse clients and control thread usage.
Changes:
- Document executor configuration, resource costs, reuse, and shutdown.
- Add examples for limiting, sharing, and naming threads.
- Expand
withConfigurationScaladoc and relocate the Scaladoc index.
| File | Description |
|---|---|
docs/06/00.markdown |
Relocates the existing Scaladoc index without changing its links. |
docs/05/a.markdown |
Adds thread configuration and shared-resource lifecycle examples. |
docs/05/00.markdown |
Replaces the index with executor configuration and lifecycle guidance. |
core/src/main/scala/execution.scala |
Adds resource-management guidance to Scaladoc; runtime behavior is unchanged. |
Review effort: Balanced
Comment on lines
+65
to
+67
| * Each executor this returns gets its own AHC client, connection pool, and threads once it | ||
| * makes its first request. Create it once and reuse it, and call `shutdown()` when you're done | ||
| * with it. |
Comment on lines
+25
to
+29
| import io.netty.channel.MultiThreadIoEventLoopGroup | ||
| import io.netty.channel.nio.NioIoHandler | ||
| import io.netty.util.HashedWheelTimer | ||
|
|
||
| val ioThreads = new MultiThreadIoEventLoopGroup(4, NioIoHandler.newFactory()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.