Skip to content

ctiapps/timeout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Timeout implementation for Crystal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published