-
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
introduce ContextAware
interface, store tracking on the context
#1492
Conversation
Hi @akarnokd, I assigned you as a reviewer as well in case you have time to take a look |
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.
interesting change, a few things to improve but I like the idea of being able to access the Context
from scheduled tasks. @smaldini there are some implications on gc pressure for a few instances where the scheduled Runnable
was a method reference and cannot be the instance itself (because it already implements Runnable
for another task)
reactor-core/src/main/java/reactor/core/publisher/FluxSubscribeOnValue.java
Outdated
Show resolved
Hide resolved
reactor-core/src/main/java/reactor/core/publisher/FluxWindowTimeout.java
Outdated
Show resolved
Hide resolved
reactor-core/src/main/java/reactor/core/publisher/FluxWindowTimeout.java
Outdated
Show resolved
Hide resolved
reactor-core/src/main/java/reactor/core/publisher/MonoCacheTime.java
Outdated
Show resolved
Hide resolved
reactor-core/src/main/java/reactor/core/publisher/FluxSubscribeOnCallable.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## tracing #1492 +/- ##
=============================================
+ Coverage 83.85% 83.85% +<.01%
+ Complexity 3941 3918 -23
=============================================
Files 363 363
Lines 30122 29968 -154
Branches 5585 5526 -59
=============================================
- Hits 25259 25131 -128
+ Misses 3214 3194 -20
+ Partials 1649 1643 -6
Continue to review full report at Codecov.
|
@@ -47,9 +47,28 @@ | |||
* | |||
* @return the {@link Disposable} instance that let's one cancel this particular task. | |||
* If the {@link Scheduler} has been shut down, throw a {@link RejectedExecutionException}. | |||
* |
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.
nitpick: remove the newlines between @
javadoc tags (keep one between last line of body and first tag)
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.
(+ a few other occurrences in the javadocs below)
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.
a tiny nitpick on the javadoc formatting (see comment), but otherwise looks good 👍
@@ -252,6 +254,7 @@ public Disposable schedule(Runnable task) { | |||
} | |||
|
|||
@Override | |||
@SuppressWarnings("deprecation") |
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.
since VirtualTimeScheduler
is public API, it should not suppress the warning. (I think it is the only public class that is suppressing the warning, but please double check)
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.
Good catch 👍 Removed the suppression
schedule*(ContextRunnable, ...)
overloads(Runnable)
oneContextRunnable
Runnable
except inCachedScheduler
and tests