@Test public void bracket(){ assertFalse(closed); FlowableIO.of(()->10) .bracket(i-> new MyCloseable()) .run(); assertTrue(closed); }
@Override public <R extends AutoCloseable> IO<R> bracket(Function<? super T, ? extends R> fn) { Managed<R> m = FlowableManaged.of(map(fn)); return m.io(); }
FlowableIO implements IO<T> { @Override public <R extends AutoCloseable> IO<R> bracket(Function<? super T, ? extends R> fn) { Managed<R> m = FlowableManaged.of(map(fn)); return m.io(); } }
FlowableIO implements IO<T> { @Override public <R extends AutoCloseable> IO<R> bracket(Function<? super T, ? extends R> fn) { Managed<R> m = FlowableManaged.of(map(fn)); return m.io(); }  }
FlowableIO implements IO<T> { @Override public <R extends AutoCloseable> IO<R> bracket(Function<? super T, ? extends R> fn) { Managed<R> m = FlowableManaged.of(map(fn)); return m.io(); }  static IO<T> of(Flowable<T> flowable); static IO<T> of(Future<T> f); static IO<T> just(T s); static IO<T> of(Supplier<? extends T> s); static IO<T> of(Supplier<? extends T> s, Scheduler ex); static IO<T> fromPublisher(Publisher<T> p); static IO<Try<T,X>> withCatch(Try.CheckedSupplier<T, X> cf, Class<? extends X>... classes); static IO<R> merge(Publisher<T1> p1, Publisher<T2> p2, BiFunction<? super T1, ? super T2, ? extends R> fn2); @Override IO<R> par(IO<B> that, BiFunction<? super T, ? super B, ? extends R> fn); @Override IO<T> race(IO<T> that); @Override IO<R> map(Function<? super T, ? extends R> s); @Override IO<R> flatMap(Function<? super T, IO<? extends R>> s); @Override IO<R> mergeMap(int maxConcurrency, Function<? super T, Publisher<? extends R>> s); @Override IO<R> bracket(Function<? super T, ? extends R> fn); @Override IO<R> bracket(Function<? super T, ? extends R> fn, Consumer<R> consumer); @Override Managed.Tupled<R,R1> bracketWith(Function<? super T, ? extends R> fn, Function<? super R, ? extends R1> with); @Override void forEach(Consumer<? super T> consumerElement, Consumer<? super Throwable> consumerError, Runnable onComplete); @Override Future<T> future(); @Override Publisher<T> publisher(); @Override ReactiveSeq<T> stream(); @Override IO<R> unit(Publisher<R> pub); }
FlowableIO implements IO<T> { @Override public <R extends AutoCloseable> IO<R> bracket(Function<? super T, ? extends R> fn) { Managed<R> m = FlowableManaged.of(map(fn)); return m.io(); }  static IO<T> of(Flowable<T> flowable); static IO<T> of(Future<T> f); static IO<T> just(T s); static IO<T> of(Supplier<? extends T> s); static IO<T> of(Supplier<? extends T> s, Scheduler ex); static IO<T> fromPublisher(Publisher<T> p); static IO<Try<T,X>> withCatch(Try.CheckedSupplier<T, X> cf, Class<? extends X>... classes); static IO<R> merge(Publisher<T1> p1, Publisher<T2> p2, BiFunction<? super T1, ? super T2, ? extends R> fn2); @Override IO<R> par(IO<B> that, BiFunction<? super T, ? super B, ? extends R> fn); @Override IO<T> race(IO<T> that); @Override IO<R> map(Function<? super T, ? extends R> s); @Override IO<R> flatMap(Function<? super T, IO<? extends R>> s); @Override IO<R> mergeMap(int maxConcurrency, Function<? super T, Publisher<? extends R>> s); @Override IO<R> bracket(Function<? super T, ? extends R> fn); @Override IO<R> bracket(Function<? super T, ? extends R> fn, Consumer<R> consumer); @Override Managed.Tupled<R,R1> bracketWith(Function<? super T, ? extends R> fn, Function<? super R, ? extends R1> with); @Override void forEach(Consumer<? super T> consumerElement, Consumer<? super Throwable> consumerError, Runnable onComplete); @Override Future<T> future(); @Override Publisher<T> publisher(); @Override ReactiveSeq<T> stream(); @Override IO<R> unit(Publisher<R> pub);  }