(prevents multiple worker threads starting when new view created)
* documentation for AlignCalcManagerI
void notifyStart(AlignCalcWorkerI worker);
/**
- * tell manager that worker is now processing data
+ * tell manager that a thread running worker's run() loop is ready to start
+ * processing data
*
* @param worker
+ * @return true if worker should start processing, false if another thread is
+ * in progress
*/
boolean notifyWorking(AlignCalcWorkerI worker);
/**
*
* @param worker
- * @return
+ * @return true if the worker is currently running
*/
boolean isWorking(AlignCalcWorkerI worker);
{
if (inProgress.contains(worker))
{
- System.err.println("Implementation error: duplicate run of worker "
- + worker);
+ return false; // worker is already working, so ask caller to wait around
}
else
{