Improve PromiseActorRef as per team comments
This commit is contained in:
parent
cb7271f974
commit
8fc66ce044
3 changed files with 116 additions and 88 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue