parallel 1.12.1 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ab1626dc9142c46fd158c149029251516227b016
4
- data.tar.gz: 3c29eb9eefe300e498affd0bb8cdf1a89af3de84
2
+ SHA256:
3
+ metadata.gz: 89d859597b00942e642e88797290b1407a87615c0bb9756b8a73a3c976410aac
4
+ data.tar.gz: 40537d9251999345344d79a6ef06946257301af2ddbe5484e1c97e6dea28d356
5
5
  SHA512:
6
- metadata.gz: 7321516475efc14a7423b97ad1072723e1ec1cf6760040b0d3faa97b83da04c4dcd19f4625c616958665bb1f7bde53ffbd3cb4ca0fc3191d74caf407ec4f678b
7
- data.tar.gz: d4572925839f6b2c5852af07ce8e425467544a44bb69f86262eb1617ada97bfb45b41819eb089787bcffb1545df5f48610f98db18ee133610fc4424e4228f76f
6
+ metadata.gz: 45a8ae3ecf5ded1f1c53aaf98cc5bb45b6e1c60e51997143a2420433f4a94d0de4e339a6a9be8f276432f8bdff359fdeb10fdc5e8aa10e34874973c5c84384c4
7
+ data.tar.gz: 9b2a309db6cd24a199fa2fd99279b4015df984c09a65896e6a56a11f080d691fceabb38684606f2c2e3291794ea50cac764c82fbb93d7c32a22720b93960c2e4
@@ -232,9 +232,12 @@ module Parallel
232
232
  end
233
233
 
234
234
  def map(source, options = {}, &block)
235
+ options = options.dup
235
236
  options[:mutex] = Mutex.new
236
237
 
237
- if RUBY_PLATFORM =~ /java/ and not options[:in_processes]
238
+ if options[:in_processes] && options[:in_threads]
239
+ raise ArgumentError.new("Please specify only one of `in_processes` or `in_threads`.")
240
+ elsif RUBY_PLATFORM =~ /java/ and not options[:in_processes]
238
241
  method = :in_threads
239
242
  size = options[method] || processor_count
240
243
  elsif options[:in_threads]
@@ -1,3 +1,3 @@
1
1
  module Parallel
2
- VERSION = Version = '1.12.1'
2
+ VERSION = Version = '1.13.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.1
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-16 00:00:00.000000000 Z
11
+ date: 2019-01-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: michael@grosser.it
@@ -40,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
40
  version: '0'
41
41
  requirements: []
42
42
  rubyforge_project:
43
- rubygems_version: 2.5.1
43
+ rubygems_version: 2.7.6
44
44
  signing_key:
45
45
  specification_version: 4
46
46
  summary: Run any kind of code in parallel processes