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

kilim.ExitMsg Maven / Gradle / Ivy

Go to download

Coroutines, continuations, fibers, actors and message passing for the JVM

There is a newer version: 2.0.2-jdk7
Show newest version
/* Copyright (c) 2006, Sriram Srinivasan
 *
 * You may distribute this software under the terms of the license 
 * specified in the file "License"
 */

package kilim;

/**
 * @see kilim.Task#informOnExit(Mailbox)
 */
public class ExitMsg {
    public final Task task; // exiting task
    public final TT result; // contains Throwable if exitCode == 1
    
    public ExitMsg(Task t,TT res) {
        task = t;
        result = res;
    }
    
    public String toString() {
        return "exit(" + task.id + "), result = " + result;
    }
    
    @Override
    public int hashCode() {
        return task.id;
    }
    @Override
    public boolean equals(Object obj) {
        return this == obj;
    }
}