[#70843] Re: [ruby-cvs:58952] hsbt:r51801 (trunk): * lib/rubygems: Update to RubyGems HEAD(fe61e4c112). — Eric Wong <normalperson@...>
hsbt@ruby-lang.org wrote:
3 messages
2015/09/17
[ruby-core:70651] [Ruby trunk - Misc #11500] [Open] [RFC] rename Queue to UnboundedQueue
From:
normalperson@...
Date:
2015-09-01 22:00:57 UTC
List:
ruby-core #70651
Issue #11500 has been reported by Eric Wong. ---------------------------------------- Misc #11500: [RFC] rename Queue to UnboundedQueue https://bugs.ruby-lang.org/issues/11500 * Author: Eric Wong * Status: Open * Priority: Normal * Assignee: ---------------------------------------- Then deprecate and warn on usage of "Queue" Or maybe even call the new one "UnsafeQueue" :) I think the name "Queue" causes too many people to use it without knowing the consequences of unbounded memory growth and lack of backpressure. In all cases I can think of, SizedQueue should be used instead of current Queue since it will not cause a process to grow out-of-memory. On the other hand, Ruby still has too many ways for users to shoot themselves in the foot with unbounded memory growth: * using IO#read with no length argument * IO#gets on unknown data * Net::HTTP or open-uri to slurp a big file into memory * "SELECT" from a DB library with no LIMIT ... etc. And having one extra guideline won't help less-experienced Rubyists at all... -- https://bugs.ruby-lang.org/