Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
douglascraigschmidt committed Mar 23, 2023
1 parent 2ee79e4 commit 8429fed
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions Reactor/ex1/src/main/java/ex1.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import utils.AsyncTaskBarrier;
import common.FlightFactory;

import java.time.Duration;
import java.time.LocalDate;
import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
Expand Down Expand Up @@ -67,23 +68,9 @@ public interface TriFunction<T1, T2, T3, R> {
/**
* Main entry point into the test program.
*/
public static void main(String[] argv) {
Flux.<Integer>generate(sink -> {
int value = (int) (Math.random() * 100);
System.out.println("Generated value: " + value);
sink.next(value);
})
.repeatWhen(
flux -> flux
.takeUntilOther(Flux.range(1, 1).filter(i -> Math.random() * 100 > 50))
)
.subscribe(value -> System.out.println("Received value: " + value));

/*
public static void main(String[] argv) throws InterruptedException {
Options.instance().parseArgs(argv);
new ex1().runTests();
*/
}

/**
Expand Down

0 comments on commit 8429fed

Please sign in to comment.