parallel_server 0.1.5 → 0.1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parallel_server/prefork.rb +6 -6
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 955a693a92fa37abfe15c9c4c42ab28498a7786b
|
4
|
+
data.tar.gz: 3c951d81ff0e66d70ceb1a65984b3c0b2b32fd8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1409e37acbcc93c652d4845c67dfbe6b485545c7ce96ac4130b2439980ca38e9e57966b05ab1593b6775819043ff00891dac8b6ec3198be523ff15f03da26c1
|
7
|
+
data.tar.gz: cadb59c70931be89fc63b82e093614125e1f962412b48278177f0d534557e856b8ed5a84d9f952faa9525add269117c546f653d51b7e6f3054891adc2bd54ae2
|
@@ -109,8 +109,8 @@ module ParallelServer
|
|
109
109
|
set_variables_from_opts
|
110
110
|
|
111
111
|
address_changed = false
|
112
|
-
if @host != host || @port != port
|
113
|
-
@sockets.each
|
112
|
+
if @sockets_created ? (@host != host || @port != port) : @sockets != sockets
|
113
|
+
@sockets.each{|s| s.close rescue nil} if @sockets_created
|
114
114
|
@sockets, @host, @port = sockets, host, port
|
115
115
|
if @sockets
|
116
116
|
@sockets_created = false
|
@@ -271,8 +271,8 @@ module ParallelServer
|
|
271
271
|
from_child = IO.pipe
|
272
272
|
to_child = IO.pipe
|
273
273
|
pid = fork do
|
274
|
-
@from_child.keys.each
|
275
|
-
@to_child.values.each
|
274
|
+
@from_child.keys.each{|p| p.close rescue nil}
|
275
|
+
@to_child.values.each{|p| p.close rescue nil}
|
276
276
|
from_child[0].close
|
277
277
|
to_child[1].close
|
278
278
|
@on_start.call if @on_start
|
@@ -346,7 +346,7 @@ module ParallelServer
|
|
346
346
|
queue.pop
|
347
347
|
|
348
348
|
accept_thread.exit
|
349
|
-
@sockets.each
|
349
|
+
@sockets.each{|s| s.close rescue nil}
|
350
350
|
@threads_mutex.synchronize do
|
351
351
|
notify_status
|
352
352
|
end
|
@@ -392,9 +392,9 @@ module ParallelServer
|
|
392
392
|
while true
|
393
393
|
data = Conversation.recv(@from_parent)
|
394
394
|
break unless data
|
395
|
+
break if data[:address_changed]
|
395
396
|
@options.update data[:options]
|
396
397
|
@options[:on_reload].call @options if @options[:on_reload]
|
397
|
-
@status = :stop if data[:address_changed]
|
398
398
|
@threads_cv.signal
|
399
399
|
end
|
400
400
|
@from_parent.close
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.5
|
4
|
+
version: 0.1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomita Masahiro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Parallel TCP Server library. This is easy to make Multi-Process / Multi-Thread
|
14
14
|
server
|
@@ -40,9 +40,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
40
40
|
version: '0'
|
41
41
|
requirements: []
|
42
42
|
rubyforge_project:
|
43
|
-
rubygems_version: 2.
|
43
|
+
rubygems_version: 2.2.2
|
44
44
|
signing_key:
|
45
45
|
specification_version: 4
|
46
46
|
summary: Parallel TCP Server library
|
47
47
|
test_files: []
|
48
|
-
has_rdoc: true
|