optimize Mailbox._status usage
- make Scheduled==4 to allow bitwise operations - unfold become(status) into three methods for better inlining - optimize patterns in setAsIdle away: table switch is probably slower than a single conditional - fix LoggingReceiveSpec glitch wrt. async stop()
This commit is contained in:
parent
4df9d621bb
commit
4b5c99e9bd
4 changed files with 78 additions and 63 deletions
|
|
@ -7,6 +7,6 @@ package akka.dispatch;
|
|||
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
|
||||
|
||||
abstract class AbstractMailbox {
|
||||
private volatile int _status = Mailbox.Idle();
|
||||
private volatile int _status; // not initialized because this is faster: 0 == Open
|
||||
protected final static AtomicIntegerFieldUpdater<AbstractMailbox> updater = AtomicIntegerFieldUpdater.newUpdater(AbstractMailbox.class, "_status");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue