Reusing temporary variables (ed: Object Pools)

I explored a similar concept in this thread and you can find the code I used at GitHub - halleysfifthinc/SafeBuffers.jl: Concurrency/multi-threading safe pre-allocated mutable buffers (e.g. arrays, etc.)

It is usable as a package but is not registered nor do I have any plans at the moment to register/maintain it. That said, it solved my problem. After a quick perusal of Tamas’ ObjectPools.jl, two main differences are that my interface is thread safe and that the type of the pool (e.g. Ref’s would be valid, etc) isn’t restricted.

3 Likes