All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertx.up.uca.web.parallel.ThreadAtom Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package io.vertx.up.uca.web.parallel;

import io.vertx.up.fn.Actuator;

import java.util.concurrent.CountDownLatch;

public class ThreadAtom extends Thread {

    private final transient CountDownLatch counter;
    private final transient Actuator consumer;

    ThreadAtom(final CountDownLatch counter,
               final Actuator consumer) {
        this.counter = counter;
        this.consumer = consumer;
    }

    @Override
    public void run() {
        this.consumer.execute();
        this.counter.countDown();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy