Improve PromiseActorRef as per team comments

This commit is contained in:
Mathias 2012-03-23 21:35:52 +01:00
parent cb7271f974
commit 8fc66ce044
3 changed files with 116 additions and 88 deletions

View file

@ -0,0 +1,19 @@
/**
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.pattern;
import akka.util.Unsafe;
final class AbstractPromiseActorRef {
final static long stateOffset;
static {
try {
stateOffset = Unsafe.instance.objectFieldOffset(PromiseActorRef.class.getDeclaredField("_stateDoNotCallMeDirectly"));
} catch(Throwable t){
throw new ExceptionInInitializerError(t);
}
}
}