Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Run tasks in the background

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 ninja.gemspec
README.rdoc

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)

Something went wrong with that request. Please try again.