fiber-safe-mutex.cr
This shard exists so we can use Mutex
on a Fiber
(spawn) dependent lib/project crystal#1612
or crystal#1399
.
Note: ~~When/if those PR get merged, this shard can go deprecated.~~ A fiber-safe mutex implementation landed on Crystal 0.14.0
. This shard is now deprecated.
It was extracted directly from @technorama's PR on Crystal: https://github.com/manastech/crystal/pull/1399
Installation
Add this to your application's shard.yml
:
dependencies:
fiber-safe-mutex:
github: gtramontina/fiber-safe-mutex.cr
Usage
require "fiber-safe-mutex"
Use it the same way you would use Mutex
.
Contributing
- Fork it ( https://github.com/gtramontina/fiber-safe-mutex.cr/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request