Skip to content

Instantly share code, notes, and snippets.

View jbrisbin's full-sized avatar

Jon Brisbin jbrisbin

View GitHub Profile
@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
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)