File: mainloop.rb

package info (click to toggle)
mikutter 3.0.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 9,396 kB
  • ctags: 1,916
  • sloc: ruby: 16,619; sh: 117; makefile: 27
file content (24 lines) | stat: -rw-r--r-- 433 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- coding: utf-8 -*-

module Mainloop
  extend Mainloop

  # メインループ実行前に呼ばれる
  def before_mainloop
  end

  # メインループ本体
  def mainloop
    loop{
      Thread.stop if Delayer.empty?
      Delayer.run while not Delayer.empty? } end

  # メインループ中に発生した例外を受け取る
  # ==== Args
  # [e] Exception
  # ==== Return
  # e
  def exception_filter(e)
    e end

end