Skip to content

Commit

Permalink
port MonoProcessor simplification in preparation for #1114
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane Maldini committed May 2, 2018
1 parent 37ce9e5 commit 6ab5186
Show file tree
Hide file tree
Showing 4 changed files with 287 additions and 278 deletions.
5 changes: 2 additions & 3 deletions reactor-core/src/main/java/reactor/core/publisher/Mono.java
Expand Up @@ -3507,9 +3507,8 @@ public final CompletableFuture<T> toFuture() {

/**
* Wrap this {@link Mono} into a {@link MonoProcessor} (turning it hot and allowing to block,
* cancel, as well as many other operations). Note that the {@link MonoProcessor} is
* {@link MonoProcessor#connect() connected to} (which is equivalent to calling subscribe
* on it).
* cancel, as well as many other operations). Note that the {@link MonoProcessor}
* is subscribed to its parent source if any.
*
* <p>
* <img width="500" src="https://raw.githubusercontent.com/reactor/reactor-core/v3.1.3.RELEASE/src/docs/marble/unbounded1.png" alt="">
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2017 Pivotal Software Inc, All Rights Reserved.
* Copyright (c) 2011-2018 Pivotal Software Inc, All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -59,9 +59,11 @@ public void subscribe(CoreSubscriber<? super T> actual) {
try {
if (e != null) {
actual.onError(e);
} else if (v != null) {
}
else if (v != null) {
sds.complete(v);
} else {
}
else {
actual.onComplete();
}
}
Expand Down

0 comments on commit 6ab5186

Please sign in to comment.