-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
for #1102 Detect some blocking APIs inside parallel and single Scheduler #1109
Conversation
Nice, ny current comments:
|
Neat, is it possible to use this in the context of HTTP request processing, i.e. not using any scheduler explicitly, but simply processing in a Reactor Netty thread? |
@rstoyanchev detection is constrained to (and initiated by) a known set of operators: |
|
@simonbasle yes I meant using one of the |
… for Schedulers (not for EventLoopProcessor)
@rstoyanchev yeah with the current state reactor-netty could be changed to instantiate |
Codecov Report
@@ Coverage Diff @@
## master #1109 +/- ##
============================================
+ Coverage 83.72% 84.28% +0.56%
- Complexity 3546 4200 +654
============================================
Files 334 337 +3
Lines 27677 28688 +1011
Branches 5183 5261 +78
============================================
+ Hits 23172 24180 +1008
- Misses 2951 2955 +4
+ Partials 1554 1553 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just get rid of the Schedulers extra method or eventually, change to isInNonBlockingThread() ?
I think instanceof should be enough and wouldn't require extra API for Schedulers.
@smaldini updated. is that what you had in mind? or maybe you were just talking about renaming the method variant that takes a |
This was causing exceptions due to reactor/reactor-core#1109.
ThreadFactory
NonBlocking
marker interfaceSchedulers
that allows to also decide aThread
is NonBlocking even if you don't have a hand in creating it.block
,blockOptional
,blockFirst
,blockLast
,toIterable
andtoStream
all check if the executing thread is NonBlocking and throw if it is