Skip to content

Documented dispatch-level pool scoping (with_execution) does not exist #109

Description

@GeneralPawz

The threading page documents a dispatch-level integration that does
not exist in the tree. Found while auditing whether the facade
parallel feature reaches the crates that actually thread.

What the docs claim

docs/architecture/threading.md states, as shipped design:

MeshBooleanRegistry::with_execution (in axiolid-dispatch, gated
behind this crate own parallel feature) wraps every dispatched
provider call in a CpuExecution local rayon pool via
ThreadPool::install [...] This is orthogonal to the decision above
and remains supported.

What is actually there

At bf82e2c:

  • with_execution does not exist anywhere in crates/, tools/, or
    tests/ -- zero matches.
  • axiolid-dispatch has no parallel feature. Its full feature list is
    default, mesh-boolean, mesh-section, pointcloud-reconstruction.
  • axiolid-dispatch does not depend on axiolid-backend-cpu at all, so
    it could not construct a CpuExecution to install into.

What DOES work

The capability exists one level down and is genuinely usable:
CpuExecution::install is public under the parallel feature and
scopes a closure into the context local pool. An application can build
a CpuExecution and wrap its own provider calls today.

What is missing is the dispatch-level seam that would apply that pool
to every dispatched provider call without the caller threading it
through by hand.

Why this matters beyond a stale sentence

The page uses this seam to justify keeping the layering rule: providers
must not depend on axiolid-backend-cpu, and scoping lives in dispatch
instead. That argument is sound, but the implementation it points at is
not present, so today there is no pool-scoping layer between an
application and a provider internal rayon usage.

Concretely: boolmesh uses rayon directly when its own parallel
feature is on. Nothing bounds that to a caller pool, so it would run on
the ambient global pool -- which is exactly what the documented design
says it prevents.

Options

  1. Implement it. Add a parallel feature to axiolid-dispatch, an
    optional axiolid-backend-cpu dependency, and
    MeshBooleanRegistry::with_execution wrapping dispatched calls in
    CpuExecution::install. Makes the docs true and gives the facade
    parallel feature a real job.
  2. Correct the docs. Describe CpuExecution::install as the
    supported mechanism and state that dispatch-level scoping is not
    implemented.

Option 1 is the better end state; option 2 should happen immediately
either way, since the page currently describes shipped behaviour that
does not exist.

Found at bf82e2c.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs-triageFiled but not yet accepted, sized, or scheduled

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions