Low commit activity in last 3 years
A long-lived project that still receives updates
Multitask with pretty output for Rake
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.1
~> 5.0
~> 13.0

Runtime

 Project Readme

tlopo-executor

Gem Version Build Status Code Climate Dependency Status Coverage Status

A simple Executor service aka Threadpool executor

Installation

Add this line to your application's Gemfile:

gem 'tlopo-executor'

And then execute:

bundle

Or install it yourself as:

gem install tlopo-executor

Usage

Simple usage

require 'tlopo/executor'
require 'socket'
require 'timeout'

exec = Tlopo::Executor.new

['80','443','22'].each do |port|
  exec.schedule(
    proc do
      begin
        Timeout.timeout(1){TCPSocket.new('www.google.co.uk', port ).close}
      rescue
        raise "Port #{port} is not open"
      end
    end
  )
end
errors = exec.run.errors
p errors unless exec.success?

Contributing

  1. Fork it ( https://github.com/[my-github-username]/kubeclient/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Test your changes with rake test rubocop, add new tests if needed.
  4. If you added a new functionality, add it to README
  5. Commit your changes (git commit -am 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create a new Pull Request

Tests

This library is tested with Minitest. Please run all tests before submitting a Pull Request, and add new tests for new functionality.

Running tests:

rake test