uk.ac.man.cs.rainbow.simulator.rasm
Class Sleep

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.simulator.Instruction
        |
        +--uk.ac.man.cs.rainbow.simulator.rasm.Sleep
All Implemented Interfaces:
Serializable

public class Sleep
extends Instruction

Cause the thread to become descheduled until something happens. Typically, the thread is woken by another thread attempting to interact with it. Any event, even a spurious one, can cause the thread to be woken, so care is required after this to see if there really is anything to do.

- -

See Also:
Delay, Serialized Form

Inner classes inherited from class uk.ac.man.cs.rainbow.simulator.Instruction
Instruction.MACRO
 
Constructor Summary
Sleep()
           
Sleep(RASMCode code)
           
 
Method Summary
protected  boolean execute(RASMThread thread)
          Make this instruction execute in the given context.
 String toString()
           
 
Methods inherited from class uk.ac.man.cs.rainbow.simulator.Instruction
addClass, getInstruction, getInstruction, getInstruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sleep

public Sleep()

Sleep

public Sleep(RASMCode code)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

execute

protected boolean execute(RASMThread thread)
Description copied from class: Instruction
Make this instruction execute in the given context.
Overrides:
execute in class Instruction
Following copied from class: uk.ac.man.cs.rainbow.simulator.Instruction
Throws:
RainbowException - All sorts of things can go wrong during execution...