[jboss-dev-forums] [Design of POJO Server] - Re: Strange classloading behavior -- thread stuck

bstansberry@jboss.com do-not-reply at jboss.com
Mon Feb 2 14:34:50 EST 2009


Probably unrelated but when poking around trying to understand this code I noticed this in ClassLoaderManager.nextTask()


  |       synchronized (taskList)
  |       {
  |          ....
  | 
  |          // See if the task is complete
  |          if (task.getThreadTaskCount() == 0)
  |          {
  |             task.finish();
  |             log.trace("End nextTask(FINISHED), task="+task);
  |             return;
  |          }
  |       }
  | 
  |       ThreadTask threadTask = taskList.remove(0);
  |       ClassLoadingTask loadTask = threadTask.getLoadTask();

The taskList is unguarded during the remove(0) call since the call is outside the synchronized block.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206338#4206338

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206338



More information about the jboss-dev-forums mailing list