Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Conflict for NonBlocking Interface in Reactor Integration #6037

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

minwoox
Copy link
Contributor

@minwoox minwoox commented Dec 16, 2024

Motivation:
The reactor.core.scheduler.NonBlocking interface was introduced to armeria-core in #1665 to make Schedulers.isInNonBlockingThread() return true for an Armeria EventLoop. However, a conflict arises when building Java modules because the NonBlocking interface clashes with Reactor's own definition.

Modifications:

  • Moved NonBlocking to com.linecorp.armeria.common to resolve the module conflict while retaining its utility for identifying non-blocking threads.
  • Updated to call Schedulers.registerNonBlockingThreadPredicate if Reactor is available in the classpath.
  • Adjusted CoreBlockHoundIntegration to update the non-blocking thread predicate.

Result:

  • Resolved the Java module conflict with the NonBlocking interface.

Motivation:
The `reactor.core.scheduler.NonBlocking` interface was introduced to `armeria-core` in line#1665 to make `Schedulers.isInNonBlockingThread()` return `true` for an Armeria `EventLoop`.
However, a conflict arises when building Java modules because the `NonBlocking` interface clashes with Reactor's own definition.

Modifications:
- Moved `NonBlocking` to `com.linecorp.armeria.common` to resolve the module conflict while retaining its utility for identifying non-blocking threads.
- Updated to call `Schedulers.registerNonBlockingThreadPredicate` if Reactor is available in the classpath.
- Adjusted `CoreBlockHoundIntegration` to update the non-blocking thread predicate.

Result:
- Resolved the Java module conflict with the `NonBlocking` interface.
@minwoox minwoox added the defect label Dec 16, 2024
@minwoox minwoox added this to the 1.32.0 milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants