Sunday, 11 August 2013

making threads stand in a queue using ConcurrentLinkedQueue

making threads stand in a queue using ConcurrentLinkedQueue

so i recently started working with multiprocessing, and its just been
breaking my mind. so just thought id ask for a little help.
OK so i have threads executing all over the place, but what i actually
want is once the threads finished the method, i want it to actually stand
in a line(like you would at the bank) before executing again.
so what i pretty much have is this
ConcertethreadManagerClass implements abstractClass{
string lotsofVariables
private Queue<ConcertethreadManagerClass > queue = new
ConcurrentLinkedQueue<ConcertethreadManagerClass >();//*
constructor(){}
public void play(boolean isExpert, int count)
{
if(count> 5)
{
//do process
}
else
//go stand in a line
}
}

No comments:

Post a Comment