[ruby-core:77970] [Ruby trunk Bug#12607] Ruby needs an atomic integer
From:
ko1@...
Date:
2016-11-05 13:27:29 UTC
List:
ruby-core #77970
Issue #12607 has been updated by Koichi Sasada. > So you mean we don't need atomic integer because concurrent-ruby sucks? I don't think that's a valid reason to reject this. I didn't mean that. After "BTW" is only my impression about threading. ---------------------------------------- Bug #12607: Ruby needs an atomic integer https://bugs.ruby-lang.org/issues/12607#change-61303 * Author: Shyouhei Urabe * Status: Feedback * Priority: Normal * Assignee: Koichi Sasada * ruby -v: * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- (This one was derived from bug #12463) Although I don't think += would become atomic, at the same time I understand Rodrigo's needs of _easier_ counter variable that resists inter-thread tampering. I don't think ruby's Integer class can be used for that purpose for reasons (mainly because it is not designed with threads in mind). Rather we should introduce a integer class which is carefully designed. Why not import Concurrent::AtomicFixnum into core? -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>