[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multi-CHAN_OF_INT
- To: occam-com@xxxxxxxxx
- Subject: Multi-CHAN_OF_INT
- From: Øyvind Teig <Oyvind.Teig@xxxxxxxxxxxx>
- Date: 28 May 1996 06:29:49 Z
- Alternate-recipient: Allowed
- Conversion: Allowed
- Disclose-recipients: Prohibited
- Original-encoded-information-types: IA5-Text
- Original-x400-recipients: non-disclosure;
- Pp-warning: Parse error in original version of preceding X400-Recipients line
- Priority: normal
- X400-content-type: P2-1984 ( 2 )
- X400-mts-identifier: [/c=NO/admd=TELEMAX/prmd=autronica/; 515 96/05/28 08:29]
- X400-originator: Oyvind.Teig@xxxxxxxxxxxx
- X400-received: by /c=no/admd=telemax/prmd=internet/; converted ( IA5-Text); Relayed; 28 May 1996 08:35:19 +0200
- X400-received: by /c=NO/admd=TELEMAX/; Relayed; 28 May 1996 06:31:37 Z
- X400-received: by /c=NO/admd=TELEMAX/prmd=autronica/; Relayed; 28 May 1996 06:29:49 Z
- X400-received: by mta MHINTERNET in /c=no/admd=telemax/prmd=internet/; converted ( IA5-Text); Relayed; 28 May 1996 08:35:19 +0200
- X400-recipients:
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) |