<commit_before>module loop

export Loop

type Loop

  instance::Function
  start::Function
  stop::Function
  attach_periodic_callback::Function
  dettach_periodic_callback::Function

  function Loop()
    this = new()
    this
  end

  function instance()
  end

  function start()
  end

  function stop()
  end

  function attach_periodic_callback()
  end

  function dettach_periodic_callback()
  end<commit_msg>Add skeleton code for Loop<commit_after>module loop

export Loop

type Loop

  instance::Function
  start::Function
  stop::Function
  attach_periodic_callback::Function
  dettach_periodic_callback::Function

  function Loop(loop=nothing)
    this                       = new()
    this.ioloop                = loop # or ioloop.IOLoop()
    this.ioloop.make_current()
    this.periodic_callback     = nothing

    this.instance                  = function() instance(this) end
    this.start                     = function() start(this) end
    this.stop                      = function() stop(this) end
    this.attach_periodic_callback  = function() attach_periodic_callback(this) end
    this.dettach_periodic_callback = function() dettach_periodic_callback(this) end

    this
  end

  function instance(self::Loop)
    # return Loop(ioloop.IOLoop.current())
  end

  function start(self::Loop)
  end

  function stop(self::Loop)
  end

  function attach_periodic_callback(self::Loop, callback::Callback, callback_time::Int)
  end

  function dettach_periodic_callback(self::Loop)
  end
{'fraction_non_alphanumeric': 0.08100929614873838, 'fraction_numerical': 0.0, 'mean_word_length': 3.1745152354570636, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3159751', 'n_tokens_mistral': 471, 'n_tokens_neox': 423, 'n_words': 98}