Skip to content

Instantly share code, notes, and snippets.

@hyrious
Created July 23, 2019 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyrious/316dd44ae6f6acea58190c0c6b28866c to your computer and use it in GitHub Desktop.
Save hyrious/316dd44ae6f6acea58190c0c6b28866c to your computer and use it in GitHub Desktop.
hack your mainloop in Midori.rb
# require 'midori.rb'
$mainloop = nil
def mainloop &blk
$mainloop = blk
end
class << EventLoop
alias _timer_once_mainloop timer_once
def timer_once
_timer_once_mainloop
$mainloop.call if $mainloop
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment