Basic HTML version of Foils prepared
May 19 99
Foil 36 Optimistic Control - Example
From
Elements of Concurrent Programming in Java Tango Group Internal Technology Seminars --
Spring 99
.
by
Lukasz Beca
1
public class Optimistic {
2
private State currentState_;
3
4
protected synchronized boolean commit(State assumed, State next) {
5
boolean success = (currentState_ = assumed);
6
if (success)
7
currentState_ = next;
8
return success;
9
}
10
}
11
in Table To:
©
Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu
If you have any comments about this server, send e-mail to
webmaster@npac.syr.edu
.
Page produced by
wwwfoil
on Wed May 19 1999