Skip to content

foca/ninja

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ninja!

He runs in the background, without being seen

Install

gem install ninja

Use

require "ninja/threaded"

# Use a thread pool to run the background jobs
Ninja.hide_in(Ninja::Threaded.new(4))

class FooBar
  include Ninja

  def my_method
    # some code
    in_background do
      # this code will run in background
    end
    # mode code
  end
end

Credits

Author

Nicolás Sanguinetti (foca)

Contributors

James Tucker (raggi)

License

MIT (see LICENSE file)

About

Run tasks in the background

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages