timeout

Timeout implementation for Crystal

timeout

Timeout implementation for Crystal.

Installation

Add this to your application's shard.yml:

dependencies:
  timeout:
    github: andrius/timeout

Usage

require "timeout"

Sample:

res = Timeout.timeout(0.1) do
  puts "this line will be printed"
  sleep 0.2
  puts "this line won't be printed"
end

# will print false
puts "Result: #{res}"

Contributing

  1. Fork it ( https://github.com/ctiapps/timeout/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • andrius Andrius Kairiukstis - creator, maintainer
Repository

timeout

Owner
Statistic
  • 1
  • 0
  • 0
  • 1
  • 0
  • over 7 years ago
  • March 20, 2017
License

MIT License

Links
Synced at

Thu, 07 Nov 2024 07:01:33 GMT

Languages