reactor / reactor-core

Non-Blocking Reactive Foundation for the JVM
http://projectreactor.io
Apache License 2.0
4.99k stars 1.21k forks source link

Allow registering a custom `Predicate` for determining non-blocking threads #3847

Closed trustin closed 4 months ago

trustin commented 4 months ago

Related issue: #3833 Motivation:

It is currently not possible to create a non-blocking threads without implementing the reactor.core.scheduler.NonBlocking interface. Some third-party libraries and frameworks don't directly depend on reactor-core, yet they want to mark the threads they manage as non-blocking.

Modifications:

Result:

pivotal-cla commented 4 months ago

@trustin Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-cla commented 4 months ago

@trustin Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-cla commented 4 months ago

@trustin Thank you for signing the Contributor License Agreement!

chemicL commented 4 months ago

Just noticed the branch is targeting main. As this is an additive change, I think we could ship this in 3.6.9. Or are you ok to delay this until 3.7.0? Adding functionality in patch brings a bit of an effort to the usages where the actual runtime library might have the API or might not so you need a way to check if you can register the Predicate.

trustin commented 4 months ago

That's a good idea, @chemicL. Let me send another PR that targets 3.6 soon. :bow:

trustin commented 4 months ago

@chemicL, I sent a new pull request for 3.6: #3854

chemicL commented 4 months ago

Thanks, closing this one then.