Closed GoogleCodeExporter closed 8 years ago
Indeed, the getNextThread method should have been synchronized. I fixed in
r328. You can download the latest build from SVN to get the fix.
Thank you for the very precise issue report!
Original comment by sype...@gmail.com
on 17 Nov 2011 at 3:55
Hi! I was wrong on the correction. The problem was when all of the threads were
busy.
This fixed the code:
protected NotificationThread getNextAvailableThread() {
for (int i = 0; i < threads.size(); i++) {
NotificationThread thread = getNextThread();
boolean busy = thread.isBusy();
if (!busy) return thread;
}
return getNextThread(); /* All threads are busy, return the next one regardless of its busy status */
}
/**
* Get the next thread to use.
*
* @return a thread
*/
protected NotificationThread getNextThread() {
if (nextThread >= threads.size()) nextThread = 0;
NotificationThread thread = threads.get(nextThread++);
return thread;
}
Original comment by gonz...@gmail.com
on 22 Nov 2011 at 4:47
Original issue reported on code.google.com by
gonz...@gmail.com
on 17 Nov 2011 at 3:36