Exemplo n.º 1
0
 /**
  * Constructs and returns an array of input channel ends, each of which can be used as guards
  * in an <code>Alternative</code>. The returned array, <code>r</code>, is constructed such that
  * <code>r[i] = c[i].in ()</code> for <code>0 <= i < c.Length</code>.
  *
  * @param c the array of channel to obtain input ends from.
  * @return the array of channel input ends.
  */
 public static AltingChannelInputInt[] getInputArray(One2OneChannelInt[] c)
 {
     AltingChannelInputInt[] In = new AltingChannelInputInt[c.Length];
     for (int i = 0; i < c.Length; i++)
     {
         In[i] = c[i].In();
     }
     return(In);
 }
Exemplo n.º 2
0
 public CrewServer(/*final*/ AltingChannelInputInt request,
                   /*final*/ AltingChannelInputInt writerControl,
                   /*final*/ AltingChannelInputInt readerRelease,
                   /*final*/ AltingChannelInputInt poison)
 {
     this.request       = request;
     this.writerControl = writerControl;
     this.readerRelease = readerRelease;
     this.poison        = poison;
 }