Phlex resources are framework-owned, user-defined objects that support algorithm execution without contributing data-flow edges or changing graph topology. Algorithms declare resource dependencies during registration; the framework supplies a resource access value for each invocation and, when needed, uses that value to limit concurrent access.
A resource type is ordinary user code. It need not derive from a Phlex base class or implement a common runtime interface.
Resource Access
Phlex defines three access categories:
- Unlimited access: Any number of algorithm invocations may access the resource concurrently.
- Single-token access: At most one algorithm invocation may hold the resource token.
- Multi-token access: At most one algorithm invocation may run per available resource token.
Algorithms request resources with resource<T>{} after product selectors in input_family(...). The corresponding resource-access values are passed as trailing algorithm parameters.
oneTBB Integration
serial_node and serializer_node were Phlex prototypes used to explore resource-constrained execution. They are superseded by oneTBB's flow::resource_limiter and flow::resource_limited_node, which provide the scheduling mechanism adopted by Phlex.
Delivery Phases
| Phase |
Scope |
Status |
| Phase 1 (#851) |
Static registration; unlimited and single-token resources; resource-aware execution nodes |
Implemented by PR #850, pending merge |
| Phase 2 (#852) |
Resource registration from dynamically loaded plugins |
Planned |
| Phase 3 (#853) |
Multi-token resources and additional token-construction forms |
Planned; awaits an official supported oneTBB release containing the required limiter constructors |
Each phase issue owns its API details, implementation constraints, and acceptance criteria.
Not Currently Scheduled
- Mutable access to unlimited resources.
- Named resource instances or multiple instances of one resource type.
- Duplicate resource dependencies in one algorithm registration.
- Provider-node resources.
Phlex resources are framework-owned, user-defined objects that support algorithm execution without contributing data-flow edges or changing graph topology. Algorithms declare resource dependencies during registration; the framework supplies a resource access value for each invocation and, when needed, uses that value to limit concurrent access.
A resource type is ordinary user code. It need not derive from a Phlex base class or implement a common runtime interface.
Resource Access
Phlex defines three access categories:
Algorithms request resources with
resource<T>{}after product selectors ininput_family(...). The corresponding resource-access values are passed as trailing algorithm parameters.oneTBB Integration
serial_nodeandserializer_nodewere Phlex prototypes used to explore resource-constrained execution. They are superseded by oneTBB'sflow::resource_limiterandflow::resource_limited_node, which provide the scheduling mechanism adopted by Phlex.Delivery Phases
Each phase issue owns its API details, implementation constraints, and acceptance criteria.
Not Currently Scheduled