Merge pull request #1027 from akka/wip-2904-timer-∂π
first cut of new AkkaTimer, see #2904
This commit is contained in:
commit
7066b37077
19 changed files with 861 additions and 200 deletions
|
|
@ -449,10 +449,11 @@ public class HashedWheelTimer implements Timer {
|
|||
return Unsafe.instance.compareAndSwapInt(this, _stateOffset, old, future);
|
||||
}
|
||||
|
||||
public void cancel() {
|
||||
public boolean cancel() {
|
||||
if (updateState(ST_INIT, ST_CANCELLED)) {
|
||||
parent.wheel[stopIndex].remove(this);
|
||||
}
|
||||
return true;
|
||||
} else return false;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue