/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved. <a>http://www.crunii.com</a>
 */
package com.crunii.micro.core.test;

import java.time.Duration;
import java.util.concurrent.CountDownLatch;
import java.util.function.BiFunction;

import reactor.core.publisher.Flux;

/**
 * @author 田平 create 2019年8月28日下午4:49:59
 */
public class Test {

	public static void main(String[] args) throws Exception {
		CountDownLatch latch=new CountDownLatch(1);
		Flux.zip(Flux.just("a","b","c","d","e","f"), Flux.interval(Duration.ofMillis(200)), new BiFunction<String, Long, String>() {
			@Override
			public String apply(String t, Long u) {		
				return t+u;
			}
		}).subscribe(System.out::println,null,latch::countDown);
		latch.await();
	}
}
