Runs a Background Loop Forever
This simple Ruby gem helps you run a loop forever, in a background thread.
require 'always'
a = Always.new(5)
a.start do
puts "I'm alive"
end
a.stop
You may be interested to get the backtraces of the exceptions that
happened most recently:
a = Always.new(5, max_backtraces: 10)
p a.backtraces
That's it.
How to contribute
Read
these guidelines.
Make sure you build is green before you contribute
your pull request. You will need to have
Ruby 3.0+ and
Bundler installed. Then:
bundle update
bundle exec rake
If it's clean and you don't see any error messages, submit your pull request.