pool.cr

A simple thread-safe generic pool.

Pool.cr

CI Documentation ISC

A simple thread-safe generic pool.

A pool can be used to store objects that are expensive to create (like connections). See here for more explanations.

Installation

Add the dependency to your shard.yml:

dependencies:
  pool:
    github: j8r/pool.cr

Documentation

https://j8r.github.io/pool.cr

Usage

require "pool"

pool = Pool.new { IO::Memory.new }
pool.get do |resource|
  # do something
end

License

Copyright (c) 2021 Julien Reichardt - ISC License

Repository

pool.cr

Owner
Statistic
  • 14
  • 0
  • 0
  • 1
  • 0
  • over 3 years ago
  • January 15, 2021
License

ISC License

Links
Synced at

Wed, 15 May 2024 20:06:03 GMT

Languages