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

co.paralleluniverse.strands.DoneSynchronizer Maven / Gradle / Ivy

The newest version!
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.paralleluniverse.strands;

import co.paralleluniverse.fibers.SuspendExecution;
import java.util.concurrent.TimeUnit;

/**
 *
 * @author pron
 */
public class DoneSynchronizer implements Condition {
    public static final DoneSynchronizer instance = new DoneSynchronizer();

    private DoneSynchronizer() {
    }

    @Override
    public Object register() {
        Strand.unpark(Strand.currentStrand());
        return null;
    }

    @Override
    public void unregister(Object registrationToken) {
    }

    @Override
    public void await(int iter) throws InterruptedException, SuspendExecution {
    }

    @Override
    public void await(int iter, long timeout, TimeUnit unit) throws InterruptedException, SuspendExecution {
    }

    @Override
    public void signal() {
    }

    @Override
    public void signalAll() {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy