IMF 自定义 IMFTimer、IMFTimerTask
IMFTimer通过一个优先队列(Taskqueue)来实现任务存储排序功能,fixDown 、fixUp实现队列堆的排序。
通过TimerThread来实现其任务执行功能,mainloop 循环执行任务task.run()
1、IMFTimer timer1 = new IMFTimer("IMF"); //新建一个IMFTimer类 2、IMFTime类中属性 TaskQueue queue 队列 private IMFTimerTask[] queue = new IMFTimerTask[128]; //默认128个任务
TimerThread thread = new TimerThread(queue);是一个线程
IMFTimerTask有属性 long nextExecutionTime;//下一次执行的时间
3、IMFTimer构造器启动线程 public IMFTimer(String name) { thread.setName(name); thread.start(); //线程启动 } 4、 thread线程的run()包括了一个 mainLoop(),mainLoop()里面先逻辑判断 currentTime 、
executionTime, (executionTime
关注
打赏
热门博文
- 计算机视觉系列 -MMDetection 之MobileNetV2YOLOV3 经典算法(一)
- Rasa 3.x 学习系列- Rasa - Issues 4635:Make Rasa X model pull interval configurable in local mode
- Rasa 3.x 学习系列- Rasa - Issues 4759:Training Luis data with luis_schema_version higher than 4.x.x will
- Rasa 3.x 学习系列- Rasa - Issues 4799 rasa interactive does not work without nlu data
- Rasa 3.x 学习系列- Rasa - Issues 4917 Support S3 namespaces when retrieving models from buckets
- Rasa 3.x 学习系列- Rasa - Issues 4925 “rasa init” will ask if user wants to train a model
- Rasa 3.x 学习系列- Rasa - Issues 4985 Fix errors during training in ResponseSelector学习笔记
- Rasa 3.x 学习系列- Rasa - Issues 4933 Improved error message that appears when an incorrect paramete学习笔记
- Rasa 3.x 学习系列- Rasa - Issues 4792 socket debug logs clog up debug feed学习笔记
- Rasa 3.x 学习系列- Rasa - Issues 4873 dispatcher.utter_message 学习笔记