JuliaConcurrent / Recyclers.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recyclers

Dev CI Aqua QA

Recyclers.jl is a set of tools for implementing memory reuse patterns in multi-tasking Julia programs.

julia> using Recyclers

julia> recycler = Recyclers.CentralizedRecycler(() -> zeros(3));

julia> xs = Recyclers.get!(recycler)  # get a cached object or create a new one
3-element Vector{Float64}:
 0.0
 0.0
 0.0

julia> Recyclers.recycle!(recycler, xs)  # returns `true` if recycled
true

About

License:MIT License


Languages

Language:Julia 100.0%