Link in the chain passes events from chain[threadIndex] to chain[(id + 1) % CHAIN_LENGTH].
Note that while the state is per thread, the thread can change per iteration. We use the above thread id to maintain the same queues are selected per thread.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.