Out vile tabs.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5465 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-10-26 20:09:18 +00:00
parent 8b79a17b6d
commit f17740894e
@@ -118,52 +118,52 @@ public class FutureResult<V>
} }
public void innerSet (V v) { public void innerSet (V v) {
for (;;) { for (;;) {
int s = getState(); int s = getState();
if (s == RAN) { if (s == RAN) {
return; return;
} }
if (s == CANCELLED) { if (s == CANCELLED) {
releaseShared(0); releaseShared(0);
return; return;
} }
if (compareAndSetState(s, RAN)) { if (compareAndSetState(s, RAN)) {
_result = v; _result = v;
releaseShared(0); releaseShared(0);
return; return;
} }
} }
} }
public void innerSetException (Throwable t) { public void innerSetException (Throwable t) {
for (;;) { for (;;) {
int s = getState(); int s = getState();
if (s == RAN) { if (s == RAN) {
return; return;
} }
if (s == CANCELLED) { if (s == CANCELLED) {
releaseShared(0); releaseShared(0);
return; return;
} }
if (compareAndSetState(s, RAN)) { if (compareAndSetState(s, RAN)) {
_exception = t; _exception = t;
_result = null; _result = null;
releaseShared(0); releaseShared(0);
return; return;
} }
} }
} }
public boolean innerCancel (boolean mayInterruptIfRunning) { public boolean innerCancel (boolean mayInterruptIfRunning) {
for (;;) { for (;;) {
int s = getState(); int s = getState();
if (ranOrCancelled(s)) { if (ranOrCancelled(s)) {
return false; return false;
} }
if (compareAndSetState(s, CANCELLED)) { if (compareAndSetState(s, CANCELLED)) {
break; break;
} }
} }
releaseShared(0); releaseShared(0);
return true; return true;
} }