- Purpose
- Domain Overview
- Event loop lifecycle and configuration (THR-FN-001 .. THR-FN-003)
- Handler management and execution contract (THR-FN-004 .. THR-FN-008)
- Idle strategies and pausers (THR-FN-010 .. THR-FN-012)
- Thread affinity and NUMA considerations (THR-FN-015, THR-FN-017)
- Relationship to decision log
- Relationship to tests
This document provides a summary view of the functional requirements for Chronicle Threads.
It organises key THR-FN-* requirements from src/main/docs/project-requirements.adoc into domains and links them to tests, benchmarks and decision records.
The detailed specification, including examples and non-functional targets, remains in project-requirements.adoc.
| Tag range | Domain | Notes |
|---|---|---|
THR-FN-001 .. THR-FN-003 |
Event loop lifecycle and configuration |
Builders, start and close behaviour, non-restartable loops. |
THR-FN-004 .. THR-FN-008 |
Handler management and execution contract |
Dynamic registration, priorities, serial execution, self-deregistration. |
THR-FN-010 .. THR-FN-012 |
Idle strategies and pausers |
Built-in pausers, custom pausers, adaptive back-off. |
THR-FN-015, THR-FN-017 |
Thread affinity and NUMA considerations |
Binding event loops to cores and NUMA-aware configuration. |
| ID | Requirement (summary) | Verification and references |
|---|---|---|
THR-FN-001 |
Provide builder-style APIs (for example |
Covered by |
THR-FN-002 |
Support idempotent |
Verified by lifecycle tests such as |
THR-FN-003 |
Reject or ignore attempts to restart an |
Behaviour exercised implicitly in lifecycle tests (for example |
| ID | Requirement (summary) | Verification and references |
|---|---|---|
THR-FN-004 |
Allow clients to add |
|
THR-FN-005 |
Require each |
Verified indirectly via |
THR-FN-006 |
Invoke each handler’s |
|
THR-FN-007 |
Require |
|
THR-FN-008 |
Allow handlers to request self-deregistration by throwing |
|
| ID | Requirement (summary) | Verification and references |
|---|---|---|
THR-FN-010 |
Provide a set of standard |
|
THR-FN-011 |
Allow applications to supply custom |
Verified by tests that provide custom pausers to loops (for example in |
THR-FN-012 |
Provide adaptive pausers (such as |
|
| ID | Requirement (summary) | Verification and references |
|---|---|---|
THR-FN-015 |
Provide mechanisms to bind event loop threads to specific CPU cores using Chronicle Affinity. |
|
THR-FN-017 |
Allow configuration patterns that support NUMA-aware placement of event loops and handler workloads. |
Documented via configuration examples in |
-
src/main/docs/decision-log.adoccaptures the rationale behind key functional choices, including the single-threaded event loop model, pauser defaults and background monitors. -
When functional behaviour changes in ways that affect these requirements, update both this summary and the project-level specification, and record the rationale in the decision log.
The test classes under src/test/java/net/openhft/chronicle/threads provide executable examples of the behaviours described above.
They are not yet annotated with requirement identifiers, but the tables in this document list representative tests for each requirement group so reviewers can trace behaviours to concrete test coverage.
Future work may add explicit THR identifiers to test names or comments to strengthen this traceability further.