Thread safe Enumerator in Ruby
问题 TLDR: Is there a thread-safe version of the Enumerator class in Ruby? What I'm trying to do: I have a method in a Ruby On Rails application that I wanted to run concurrently. The method is supposed to create a zip file containing reports from the site, where each file in the zip is a PDF. The conversion from html to PDF is somewhat slow, thus the desire to multi-thread. How I expected to do it: I wanted to use 5 threads, so I figured I would have a shared Enumerator between the threads. Each