concurrent-ruby
concurrent-ruby copied to clipboard
Modern concurrency tools including agents, futures, promises, thread pools, supervisors, and more. Inspired by Erlang, Clojure, Scala, Go, Java, JavaScript, and classic concurrency patterns.
I've read a code in `{lib,spec}/concurrent/executor` a bit. It looks like people loves java way: the abstraction layer is ideal, documentation is great, tests are good and implementation is poor....
`Concurrent::Hash` and `Concurrent::Array` are not fully threadsafe on CRuby. This can be demonstrated for `Array` with: ```ruby require 'concurrent/array' array = Concurrent::Array.new array
One of the biggest barriers to using autoload w/i this gem is the circular reference caused by the use of `Delay` within the global config. I no longer feel that...
Otherwise we get misleading suggestions from did-you-mean in case `concurrent/atomic/atomic_fixnum` is not required but the extension is loaded like: ``` NameError: uninitialized constant Concurrent::AtomicFixnum counter = AtomicFixnum.new ^^^^^^^^^^^^ Did you...
This is a suggestion. I was recently faced with a problem in a Rails app using Futures where log content that was run by a Future task did not contain...
``` * Operating system: linux * Ruby implementation: MRI 2.6.6, 2.7.4, 3.1.2 * `concurrent-ruby` version: 1.1.10 * `concurrent-ruby-ext` installed: no * `concurrent-ruby-edge` used: no ``` When passing a `block` to...
``` * Operating system: linux * Ruby implementation: Ruby * `concurrent-ruby` version: 1.1.10 * `concurrent-ruby-ext` installed: no * `concurrent-ruby-edge` used: no ``` The test script ```ruby # frozen_string_literal: true require...
Ruby pools create threads first before putting work to queue, java threads put work first into queue until full then they create new threads. This needs to be unified. We...
Reading [the guide](http://ruby-concurrency.github.io/concurrent-ruby/1.1.2/file.promises.out.html) for the [Promises](http://ruby-concurrency.github.io/concurrent-ruby/1.1.2/Concurrent/Promises.html) work in 1.1.x I came across the fantastic `Concurrent::Promises.zip` method. It's interface, per the guide, expects an array of `Future`s and will return a...
My first time trying to use concurrent-ruby in Rails5 and with MRI 2.3. MRI 2.3.1. concurrent-ruby 1.0.2. Running into something very odd. ``` future = Concurrent::Future.execute { something_that_will_cause_rails_autoloading } future.value...