Project

General

Profile

Actions

Feature #12607

open

Ruby needs an atomic integer

Added by shyouhei (Shyouhei Urabe) over 5 years ago. Updated 9 months ago.

Status:
Feedback
Priority:
Normal
Target version:
-
[ruby-core:86708]

Description

(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?


Related issues

Related to Ruby master - Feature #12463: ruby lacks plus-plusRejectedko1 (Koichi Sasada)Actions
Has duplicate Ruby master - Feature #14706: Atomic Integer incr/decrClosedActions
Actions

Also available in: Atom PDF