阅读背景:

如何使我的ArrayList线程安全? Java中另一种解决问题的方法?

来源:互联网 

I have an ArrayList that I want to use to hold RaceCar objects that extend the Thread class as soon as they are finished executing. A class, called Race, handles this ArrayList using a callback method that the RaceCar object calls when it is finished executing. The callback method, addFinisher(RaceCar finisher), adds the RaceCar object to the ArrayList. This is supposed to give the order in which the Threads finish executing.I have an ArrayList that I want to use to hold




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: