[dmd-concurrency] draft 7
Robert Jacques
sandford at jhu.edu
Mon Feb 1 11:55:57 PST 2010
Page 24, P1: "The notable absent is real, which is the only a platform
dependent type that the implementation has discretion regarding atomic
sharing."
which is the only a platform dependent type => which is a platform
dependent type
Page 28, P3: "good ole days of classic multithreading;"
ole => old
Page 28 Comments:
The limitations on internal data should be mentioned.
- Can private members be accessed by other functions/etc inside
BankAccount's module
- Do member have to be private? Can they be protected? Public?
- Would a transfer function like this be possible?
synchronized class BankAccount {
private double _balance;
void transfer(BankAccount dst, double amount) {
enforce(_balance >= amount);
_balance -= amount;
dst._balance += amount;
}
}
or would you have to do it like the later example?
- Are arrays and associative arrays supported?
Section 1.14.1 Comments:
If a reference to data protected by synchronization escapes, then races
can and will occur. This seems like a fundamental flaw in the design. I
think a cast should be required to enable an escape.
Page 30 Last P: "Inside a method of BankAccount, _parent must be
considered of type shared(BankAccount).": Did you mean _issuer and Bank?
Page 32 P2: "It is not impossible the issue might be revisited later":
impossible the => impossible and the
More information about the dmd-concurrency
mailing list