https://github.com/foca/ninja
Run tasks in the background
https://github.com/foca/ninja
Last synced: 11 months ago
JSON representation
Run tasks in the background
- Host: GitHub
- URL: https://github.com/foca/ninja
- Owner: foca
- License: mit
- Created: 2009-08-07T04:51:52.000Z (almost 17 years ago)
- Default Branch: master
- Last Pushed: 2009-08-07T05:11:49.000Z (almost 17 years ago)
- Last Synced: 2025-07-13T10:54:12.957Z (12 months ago)
- Language: Ruby
- Homepage:
- Size: 78.1 KB
- Stars: 23
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE
Awesome Lists containing this project
README
= 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[http://github.com/foca])
Contributors:: James Tucker (raggi[http://github.com/raggi])
License:: MIT (see LICENSE file)