I hereby claim:
- I am pcockwell on github.
- I am pcockwell (https://keybase.io/pcockwell) on keybase.
- I have a public key ASBZb3xYy2OoatNs47sjucqNTnznhYarApmgc1XVG4KwXQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'parallel' | |
############################################################### | |
# Blocks run via Parallel will block on the completion | |
# of all threads or processes before continuing afterwards | |
module ParallelHelper | |
def process_in_batches_with_threads(enumerable, num_threads, &block) | |
# Even out batches as much as possible between each thread | |
batch_size = (enumerable.size.to_f / num_threads.to_f).ceil |
# | |
# This is the main Apache HTTP server configuration file. It contains the | |
# configuration directives that give the server its instructions. | |
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. | |
# In particular, see | |
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> | |
# for a discussion of each configuration directive. | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure |