timeout
Version, currently master branch1 version
- master branchlatestFeb 9, 2020
github.com/dscottboggs/timeout
A VERY simple library for timing-out a potentially infinitely-running function call
0 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
timeout:
github: dscottboggs/timeout
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.32.1- License
- MIT
- Author
- D. Scott Boggs
Dependencies
This version declares no dependencies.
README
timeout
A VERY simple library for timing-out a potentially infinitely-running function call
Installation
-
Add the dependency to your
shard.yml:dependencies: timeout: github: dscottboggs/timeout -
Run
shards install
Usage
require "timeout"
Timeout(String).try_for 1.second do
# some maybe long-running code
end
Unfortunately, for now you must specify the return-type of the block, due to a restriction in Crystal's type system.
Contributing
- Fork it (https://github.com/dscottboggs/timeout/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature'). - Run
crystal tool formatandcrystal specon the project. - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- D. Scott Boggs - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Feb 9, 2020
- Crystal
0.32.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/dscottboggs/timeout
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 16, 2026
- Synced
- Aug 16, 2026
- Versions
- 1