This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.sample; | |
import org.openjdk.jmh.annotations.*; | |
import org.openjdk.jmh.logic.BlackHole; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.concurrent.TimeUnit; | |
@Measurement(iterations = 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void workerOrchestrator() throws InterruptedException { | |
Environment env = new Environment(); | |
Reactor reactor = Reactors.reactor(env, Environment.THREAD_POOL); | |
CountDownLatch latch = new CountDownLatch(2); | |
reactor.on(Selectors.$("worker"), new Consumer() { | |
@Override |