Skip to content

Commit

Permalink
fix reactor#975 windowWhen reimplementation stops retaining windows
Browse files Browse the repository at this point in the history
This commit fixes `windowWhen` leaks by changing `FluxWindowWhen`
implementation, bringing it in line with that of RxJava (drained windows
were retained until main sequence completion previously).

Added padding test of QueueDrainSubscriber using the Java Object Layout
(JOL) tool.
  • Loading branch information
simonbasle committed Jan 9, 2018
1 parent a961a7f commit 953cf13
Show file tree
Hide file tree
Showing 6 changed files with 1,025 additions and 371 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ project('reactor-core') {
testCompile "org.hamcrest:hamcrest-library:1.3",
"org.testng:testng:6.8.5",
"org.assertj:assertj-core:$assertJVersion",
"org.mockito:mockito-core:$mockitoVersion"
"org.mockito:mockito-core:$mockitoVersion",
"org.openjdk.jol:jol-core:0.9"

baseline("io.projectreactor:reactor-core:$compatibleVersion") {
transitive = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7713,7 +7713,6 @@ public final <U, V> Flux<Flux<T>> windowWhen(Publisher<U> bucketOpening,
return onAssembly(new FluxWindowWhen<>(this,
bucketOpening,
closeSelector,
Queues.unbounded(Queues.XS_BUFFER_SIZE),
Queues.unbounded(Queues.XS_BUFFER_SIZE)));
}

Expand Down
Loading

0 comments on commit 953cf13

Please sign in to comment.