Question: is the ruby version of Concurrent::ThreadLocalVar that is in 0.7.0 going to leak?

30 views
Skip to first unread message

Matt Campbell

unread,
Oct 1, 2014, 5:20:20 PM10/1/14
to concurr...@googlegroups.com
If I have many short lived threads that use a Concurrent::ThreadLocalVar, won't the values of the var, along with the threads themselves leak in the implementation introduced in this commit: https://github.com/ruby-concurrency/concurrent-ruby/commit/316ddddeb120f090f71eafe3ff09c12cbbf9759f. I understand the desire to not produce the "un-GC-able" symbols, but it looks like this has been traded for holding on to references to the threads themselves, meaning they cannot get garbage collected. Am I correct, or will the threads and values get GC'ed even though the @storage hash has references to them?

Thoughts?

Matt

Matt Campbell

unread,
Oct 1, 2014, 10:31:38 PM10/1/14
to concurr...@googlegroups.com
After speaking with one of the maintainers, I have opened an issue. https://github.com/ruby-concurrency/concurrent-ruby/issues/163 
Reply all
Reply to author
Forward
0 new messages