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

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

Go to download

The core library for Fibers on Java, compatible with Java 11-16. Forked from puniverse/quasar

There is a newer version: 10.0.6
Show 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 - 2024 Weber Informatics LLC | Privacy Policy