qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danny Guo <gdhda...@gmail.com>
Subject AsynchIO state transition
Date Mon, 13 Sep 2010 22:04:38 GMT
Hi all,

Is there a simplistic way to understand the state transition? I got confused
with the oldState, newState and “action”.

My understanding is that

1) postWrite only in IDLE state;

2) stop IO when a) there’s no outstanding write (DRAINED), or 2) it's in

3) queue up Write requests in any other state and wait until IDLE to drain
the write queue.

What confuses me is that:

 1) why do we need the Notify/Pending_notify/Pending_data/Data state.

2) why do we need to use state.get() to set both oldState and newState? The
state transition code should be locked anyway.

3) when will state.boolCompareAndSwap(oldState, newState) ever return false?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message