@Override public void onComplete() { PushSubscriber.this.onComplete(); } };
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); }
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); } protected ReactiveSeq<Integer> range(int start,int end){
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); } protected ReactiveSeq<Integer> range(int start,int end){
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); } @Test
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); } @Test
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); } @Test
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); } @Test
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); } @Test
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); } protected ReactiveSeq<Integer> range(int start, int end){
protected ReactiveSeq<Integer> range(int start, int end){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (int i =start;i<end;i++) { s.onNext(i); } s.onComplete(); }); t.start(); }); } protected <U> ReactiveSeq<U> rs(U... array){
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); } ScheduledExecutorService ex =Executors.newScheduledThreadPool(1);
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); }
public <T> Folds<T> of(T... values){ return Spouts.<T>async(s->{ Thread t = new Thread(()-> { for (T next : values) { s.onNext(next); } s.onComplete(); }); t.start(); }); }
protected <U> ReactiveSeq<U> of(U... array){ return Spouts.async(s->{ Thread t = new Thread(()-> { for (U next : array) { s.onNext(next); } s.onComplete(); }); t.start(); }); }
protected <U> ReactiveSeq<U> of(U... array){ int[] index = {0}; return Spouts.async(s->{ new Thread(()-> { for (U next : array) { s.onNext(next); if(index[0]++>100) break; } s.onComplete(); }).start(); }); } @Test
protected ReactiveSeq<Long> rangeLong(long start,long end){ return Spouts.async(s->{ Thread t = new Thread(()-> { rangeLong(start,end).forEach(s::onNext); s.onComplete(); }); t.start(); }); } @Test
protected ReactiveSeq<Integer> range(int start,int end){ return Spouts.async(s->{ Thread t = new Thread(()-> { range(start,end).forEach(s::onNext); s.onComplete(); }); t.start(); }); } @Test @Ignore
protected ReactiveSeq<Integer> range(int start,int end){ return Spouts.async(s->{ Thread t = new Thread(()-> { range(start,end).forEach(s::onNext); s.onComplete(); }); t.start(); }); } protected ReactiveSeq<Long> rangeLong(long start,long end){
@Test public void async(){ assertThat(Spouts.async(sub->{ sub.onNext(1); sub.onNext(2); sub.onComplete(); }).toList(),equalTo(Arrays.asList(1,2))); } @Test