[concurrency-interest] Re: leaders/followers pattern
radhakrishnan.mohan at gmail.com
Wed Jun 8 00:21:05 EDT 2005
Actually I meant the following pattern.
1. Leader thread waits for event on any handle in its handle set
2. When event is detected, a follower is promoted to leader
3. Uses event handler to process event.Rejoins the thread pool when processing
finishes (as either leader or follower)
So instead of giving the task to another thread in the pool, the leader
This is supposed to reduce context switching. Are there any implementations of
this ? I am looking at java.util.concurrent now. Can we use this if we want to
reduce context switching ?
More information about the Concurrency-interest