Closed trustin closed 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.
@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.
@trustin Thank you for signing the Contributor License Agreement!
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
.
That's a good idea, @chemicL. Let me send another PR that targets 3.6 soon. :bow:
@chemicL, I sent a new pull request for 3.6: #3854
Thanks, closing this one then.
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 onreactor-core
, yet they want to mark the threads they manage as non-blocking.Modifications:
Schedulers.registerNonBlockingThreadPredicate()
so that a user can register their ownPredicate
that determines whether a given thread is non-blocking or notSchedulers.resetNonBlockingThreadPredicate()
so that a user can reset the registrations.SchedulersTest.isInNonBlockingThreadTrue()
Result:
Thread
classes as non-blocking without depending onreactor-core
or implementing theNonBlocking
marker interface.