| 1 | # -*- coding: utf-8 -*- |
| 2 | |
| 3 | module Mainloop |
| 4 | extend Mainloop |
| 5 | |
| 6 | # メインループ本体 |
| 7 | def mainloop |
| 8 | loop{ |
| 9 | Thread.stop if Delayer.empty? |
| 10 | Delayer.run while not Delayer.empty? } end |
| 11 | |
| 12 | # メインループ中に発生した例外を受け取る |
| 13 | # ==== Args |
| 14 | # [e] Exception |
| 15 | # ==== Return |
| 16 | # e |
| 17 | def exception_filter(e) |
| 18 | e end |
| 19 | |
| 20 | end |