Thread1 is a periodic thread (extends WatchedPeriodicThread) that runs for 10 iterations and then dies because of an "unexpected" exception.
Thread1 是一个周期性线程(扩展 WatchedPeriodicThread),运行 10 个迭代后由于 “意外” 异常而终止。
This constructor lets you specify the priority, memory sizes, and period for a thread, along with the class that represents the thread to be run (a class that extends PeriodicThread).
此构造函数让您能够指定优先级、内存大小、线程周期和表示要运行的线程的类(扩展periodicthread的类)。
Thread2 is a simple periodic thread (extends WatchedPeriodicThread) that continues to run forever.
Thread2是一个简单的周期性线程(扩展WatchedPeriodicThread),它会一直运行下去。
应用推荐