ruby-concurrency / concurrent-ruby

Modern concurrency tools including agents, futures, promises, thread pools, supervisors, and more. Inspired by Erlang, Clojure, Scala, Go, Java, JavaScript, and classic concurrency patterns.
https://ruby-concurrency.github.io/concurrent-ruby/
Other
5.68k stars 417 forks source link

Review usages of Integer#size in the gem #1057

Open eregon opened 1 month ago

eregon commented 1 month ago

From @XrXr in https://bugs.ruby-lang.org/issues/20614#note-8, we should review usages of Integer#size as it is not equal to pointer size on Windows.

eregon commented 1 month ago

https://github.com/search?q=repo%3Aruby-concurrency%2Fconcurrent-ruby%200.size&type=code

https://github.com/ruby-concurrency/concurrent-ruby/blob/cadc8de0457a6f75bb7d343e6c21b92baea564c9/lib/concurrent-ruby/concurrent/thread_safe/util.rb#L10 https://github.com/ruby-concurrency/concurrent-ruby/blob/cadc8de0457a6f75bb7d343e6c21b92baea564c9/lib/concurrent-ruby/concurrent/utility/native_integer.rb#L7-L8 https://github.com/ruby-concurrency/concurrent-ruby/blob/cadc8de0457a6f75bb7d343e6c21b92baea564c9/lib/concurrent-ruby/concurrent/thread_safe/util/xor_shift_random.rb#L32