[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multi-CHAN_OF_INT



A few comments (done to the Friday 24.5 version)

1. How is flow through a CHAN_OF_INT if
   One tx and several rx?
    It does not seem to be a brodcast (from code inspection),
    but a "whoever is the the next rx gets the next tx INT)
    In case I am right, when is such a scheme wanted?
2.  
  class MONITOR
  {
    // Empty class, with no data and no metods
    // It becomes a Java object that inherits its own monitor (used)
    // and its notify and wait (*not used*)
    // notify and wait are final and cannot be overridden. Is there 
    // a way to make their use illegal in this context, see later
  }
3. In the Java library source code it says that
   "The method wait() can only be called from within a synchronized method"
   "The method notify() can only be called from within a synchronized method"
   I gather this must be meant literally also to cover "or withing a
   synchronized block" ? 
4.
  wait ();                  // How do we know that this and ..
  // this.wait ();          // this is the same, and not ..
  // read_monitor.wait ();  // equal to this or ..
  // write_monitor.wait (); // this? Scoping rules?

  notify ();                  // How do we know that this and ..
  // this.notify ();          // this is the same, and not ..
  // read_monitor.notify ();  // equal to this or ..
  // write_monitor.notify (); // this? Scoping rules?

  In the view of this, I would have explicitly stated "this.wait()" etc.
  If an occam variable is taken out of scope by another variable with
  the same name, the old is in fact taken out of scope. 
  Why couldn't it be like this in Java?


Cheers,   |   0yvind Teig, Autronica, Trondheim, Norway       |
Oyvind    |   Oyvind.Teig@xxxxxxxxxxxxxxxxxxxx                |
          |   Presently obsolete address: teig@xxxxxxxxxxxx   |
          |   47 73 58 12 68 (Tel) 47 73 91 93 20 (Fax)       |