
Modern concurrency tools for Ruby - sciurus
https://github.com/ruby-concurrency/concurrent-ruby
======
mattiemass
Shame on me for thinking that you needed other languages for good concurrency.
This looks awesome!

~~~
xiaoma
The GIL prevents parallelism but not concurrency.

~~~
keypusher
So if I have 2 CPU-bound tasks, none of the tools in this toolbox will allow
them to run in parallel on multiple cores?

~~~
vidarh
They can't run in parallel while _in the interpreter_ on MRI. Code that spends
lot of time in the kernel (long running system calls for IO etc.) or in C
extensions (say database adapters) can run properly in parallel, so on MRI it
very much depends on your workload.

If you want to ensure proper parallelism, then fork.

------
taf2
The thread safe Array class is interesting how is that different from ruby's
built in Queue class- in what context I guess would it make sense in place of
Queue?

------
cschneid
I've used this library (the promises part) and it works fine. Error handling
as a proc is mildly awkward, but worked out fine.

------
rajangdavis
Can someone please help me out and explain how to use this library? Or explain
the use cases for which a library like this would be a good fit.

~~~
chrisseaton
It's a toolbox library so to explain how to use it in general I'd have to
explain all of those tools individually.

If you're familiar with concurrency or parallelism in another language I can
tell you how to achieve something similar in many cases using concurrent-ruby.

Or if you have some algorithm you want to make concurrent or parallel from
scratch ask us in the Gitter room.

------
ashayh
There is also the ruby parallel gem,
[https://github.com/grosser/parallel](https://github.com/grosser/parallel)

------
tomc1985
This is cool! Both to use, and to study. Thank you!

