# | Line 39 | Line 39 | import java.util.stream.Stream; | |
---|---|---|
39 | * class OneShotPublisher implements Publisher<Boolean> { | |
40 | * final Executor executor = Executors.newSingleThreadExecutor(); | |
41 | * public void subscribe(Subscriber<? super Boolean> subscriber) { | |
42 | < | * subscriber.onSubscribe(new OneShotSubscription(subscriber)); |
42 | > | * subscriber.onSubscribe(new OneShotSubscription(subscriber, executor)); |
43 | * } | |
44 | * static class OneShotSubscription implements Subscription { | |
45 | * final Subscriber<? super Boolean> subscriber; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |