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

il.ac.bgu.cs.bp.bpjs.execution.tasks.StartBThread Maven / Gradle / Ivy

package il.ac.bgu.cs.bp.bpjs.execution.tasks;

import il.ac.bgu.cs.bp.bpjs.model.BThreadSyncSnapshot;
import org.mozilla.javascript.Context;

/**
 * A task to start a BThread, taking it from its entry point to its first {@code bsync}.
 */
public class StartBThread extends BPEngineTask {

    public StartBThread(BThreadSyncSnapshot aBThread, BPEngineTask.Listener l) {
        super(aBThread, l);
    }

    @Override
    BThreadSyncSnapshot callImpl( Context jsContext ) {
        jsContext.callFunctionWithContinuations(bss.getEntryPoint(), bss.getEntryPoint(), new Object[0]);
        return null;
    }
   
    @Override
    public String toString() {
        return "[StartBThread " + bss.getName() + "]";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy