Add the following code to your project's shard.yml under:
dependencies
to use in production
- OR -
development_dependencies
to use in development
Provides delay
, future
, and lazy
convenient methods to perform operations in a separate Fiber.
Add the dependency to your shard.yml
:
dependencies:
future:
github: crystal-community/future.cr
Run shards install
require "future"
d = delay(1) { Process.signal(Signal::KILL, Process.pid) }
# ... long operations ...
d.cancel
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)