parallelizer 0.0.3-java → 0.0.4-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/parallelizer.rb +6 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3960f5486b3fa034ffa62508d6f5183c24f43cc6
4
- data.tar.gz: 7eadc69bdff090b0ac7082cc6bccadc04dc47ff0
3
+ metadata.gz: b3692433bc34de9a11efa83488022b791f54f6e4
4
+ data.tar.gz: 07c99835d3d52c65f81573790c88a5e64e4810ec
5
5
  SHA512:
6
- metadata.gz: 46102a617b24a77ff993f33cc20b75e84f1ff54c716e4dbab91629ea19bce84ccf9fb7763d49e2f9d74436edf801767fc60c7feaa5f1b42a4adf7a4c5d087b23
7
- data.tar.gz: f79a1e07d0082e96d7f86cc6584698936c74ba78651de0c0496c2a2a161d605080e7424351034ab015a2cf1f870a659276f0f80d272a8544e8f78999e730bbd2
6
+ metadata.gz: 51c3d72d22b20a22c613ca0c0922e33a58a8989eabc42b402fc0da7bbe7955e7ff07274bb317c03f9417025be3d0db21842a81df531fb7c04b09ca5c4c0b4db7
7
+ data.tar.gz: 81579a4a0482dc559a1f5202cf16ae4d47ee95d1053a539bd9292543b4e2625b36ff9ab36e5e901712ed2a8090a641c28edc019c751ca3aa68ab450bf1b2e7eb
data/lib/parallelizer.rb CHANGED
@@ -107,14 +107,12 @@ class Parallelizer
107
107
  if i < computation_array.size - 1
108
108
  task = FutureTask.new(comp)
109
109
 
110
- begin
111
- @pool.execute task
112
- rescue Java::JavaUtilConcurrent::RejectedExecutionException
113
- raise RejectedExecutionException.new($!.message)
114
- end
115
-
116
-
117
- future_tasks << task
110
+ begin
111
+ @pool.execute task
112
+ future_tasks << task
113
+ rescue Java::JavaUtilConcurrent::RejectedExecutionException
114
+ results_array[i] = RejectedExecutionError.new($!.message)
115
+ end
118
116
  else #last element, run it in this thread
119
117
  comp.call
120
118
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallelizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: java
6
6
  authors:
7
7
  - Mohamed Hafez