Skip to content

[POC] Use the Executor of the resolve context - #597

Draft
laeubi wants to merge 1 commit into
apache:masterfrom
laeubi:resolver-context-executor
Draft

laeubi wants to merge 1 commit into
apache:masterfrom
laeubi:resolver-context-executor

Conversation

@laeubi

@laeubi laeubi commented Nov 20, 2026

Copy link
Copy Markdown

Proof of feasibility for osgi/org.osgi.service.resolver#51, which proposes ResolveContext.getExecutor() returning an Optional<Executor>.

Changes

  • ResolverImpl.resolve(ResolveContext) runs its parallel work on the executor of the resolve context if there is one.
    It takes precedence over an executor or parallelism configured on the resolver.
    Without one, the previous behavior applies.
  • resolveDynamic uses the executor of the context too, instead of always running on the calling thread.
  • The embedded copy of ResolveContext gets the new method, and the package version is raised to 1.2.0 as proposed.
  • A test checks that the executor of the context is used.

This is a proof of feasibility and depends on the specification change, so it should not be merged before it is agreed.

If the resolve context provides an Executor, the resolver runs its
parallel work on it, taking precedence over an executor or parallelism
configured on the resolver. Without one, the previous behavior applies.

Showcase for osgi/org.osgi.service.resolver#51.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Christoph Läubrich <christoph@laeubi-soft.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant