Skip to content

j8r/pool.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple thread-safe generic pool.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published