Project

General

Profile

Actions

Feature #12607

closed

Ruby needs an atomic integer

Added by shyouhei (Shyouhei Urabe) over 8 years ago. Updated over 2 years ago.

Status:
Feedback
Target version:
-
[ruby-core:76492]

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 2 (0 open2 closed)

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

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0