rbbt-util 5.5.38 → 5.5.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/rbbt/tsv/filter.rb +1 -1
- data/lib/rbbt/util/semaphore.rb +15 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2VmNmQwZDc4Yjk1OTNkYWYzNjlkNjEyMzQ3MTc5MTNjOWQyMGU5OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YmJhNTBhZGQzOTg5NGQzM2RmYjBiNGEzZThiNzhjYThmZmM4MmFiOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWYzZDIwNGVjNjQ3OWExOGQwNjczNGY0ODhiNDMzMDg4NWNiNGY3MjIxY2Jh
|
10
|
+
NmFjMzNiMzBiZjYzODlhNzE5ODA0Y2VjNTNlOTUwZmI5Zjc5MTc1MWNhN2E3
|
11
|
+
NTYxYmRmZmZiNmEzNzU2ZGQ3ZmFhMjI2ODIyMTA4YzhjMGFkYmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWU4N2NiMWYxYTY2OWFiZGUzYmM2Y2YxZDI2N2RkMzZmZGI1YWQzYTFiZWNk
|
14
|
+
YzJhYjU1YjUxOWZiZWUxNzY2YTU5NTFjOTRlNDY0NTA1YjQzZTY3MjA1NmQ1
|
15
|
+
NWQxZTMxYjE3YmY5NjUwZGQwNjEyZWZiZTBmMzhmZTY2MGQ1YmE=
|
data/lib/rbbt/tsv/filter.rb
CHANGED
data/lib/rbbt/util/semaphore.rb
CHANGED
@@ -63,17 +63,24 @@ void post_semaphore(char* name){
|
|
63
63
|
|
64
64
|
def self.fork_each_on_semaphore(elems, size, file = nil)
|
65
65
|
with_semaphore(size, file) do |file|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
66
|
+
begin
|
67
|
+
pids = elems.collect do |elem|
|
68
|
+
Process.fork do
|
69
|
+
RbbtSemaphore.wait_semaphore(file)
|
70
|
+
begin
|
71
|
+
yield elem
|
72
|
+
ensure
|
73
|
+
RbbtSemaphore.post_semaphore(file)
|
74
|
+
end
|
73
75
|
end
|
74
76
|
end
|
77
|
+
pids.each do |pid| Process.waitpid pid end
|
78
|
+
rescue Exception
|
79
|
+
Log.error "Killing children: #{pids.sort * ", " }"
|
80
|
+
pids.each do |pid| begin Process.kill "INT", pid; rescue; end; RbbtSemaphore.post_semaphore(file) end
|
81
|
+
Log.error "Ensuring children are dead: #{pids.sort * ", " }"
|
82
|
+
pids.each do |pid| begin Process.waitpid pid; rescue; end; end
|
75
83
|
end
|
76
|
-
pids.each do |pid| Process.waitpid pid end
|
77
84
|
end
|
78
85
|
end
|
79
86
|
end if continue
|