grpc 1.0.0.pre2-x64-mingw32 → 1.0.0-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/grpc_c.32.ruby +0 -0
- data/grpc_c.64.ruby +0 -0
- data/src/ruby/lib/grpc/2.0/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.1/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.2/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.3/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/generic/bidi_call.rb +36 -59
- data/src/ruby/lib/grpc/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c3bdb4519e082e8638ca67e10d138ef277acdbc
|
4
|
+
data.tar.gz: 784d9557aeb3f35653dae4802cfb6e7ce0d2e337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b02063c5b7862c9bd0dd96e1b8ad5dc6f9f2e91f6a4efad39d5dd0f7cf1826b9368f38560d77c9e6d6ba8ab5c378561a85835748fc4f7b4294f377d29258e3ee
|
7
|
+
data.tar.gz: b03b1066ac341f76534beb8cd3fd96ef3b24f3e5329f78cc65fc6a960accc67c05388cd8511bf08075da1476cf3dc05eb47075abb743523bdcdd4d589f4adacd
|
data/grpc_c.32.ruby
CHANGED
Binary file
|
data/grpc_c.64.ruby
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -61,7 +61,6 @@ module GRPC
|
|
61
61
|
@call = call
|
62
62
|
@marshal = marshal
|
63
63
|
@op_notifier = nil # signals completion on clients
|
64
|
-
@readq = Queue.new
|
65
64
|
@unmarshal = unmarshal
|
66
65
|
@metadata_received = metadata_received
|
67
66
|
@reads_complete = false
|
@@ -81,8 +80,7 @@ module GRPC
|
|
81
80
|
def run_on_client(requests, op_notifier, &blk)
|
82
81
|
@op_notifier = op_notifier
|
83
82
|
@enq_th = Thread.new { write_loop(requests) }
|
84
|
-
|
85
|
-
each_queued_msg(&blk)
|
83
|
+
read_loop(&blk)
|
86
84
|
end
|
87
85
|
|
88
86
|
# Begins orchestration of the Bidi stream for a server generating replies.
|
@@ -97,8 +95,7 @@ module GRPC
|
|
97
95
|
#
|
98
96
|
# @param gen_each_reply [Proc] generates the BiDi stream replies.
|
99
97
|
def run_on_server(gen_each_reply)
|
100
|
-
replys = gen_each_reply.call(
|
101
|
-
@loop_th = start_read_loop(is_client: false)
|
98
|
+
replys = gen_each_reply.call(read_loop(is_client: false))
|
102
99
|
write_loop(replys, is_client: false)
|
103
100
|
end
|
104
101
|
|
@@ -135,24 +132,6 @@ module GRPC
|
|
135
132
|
batch_result
|
136
133
|
end
|
137
134
|
|
138
|
-
# each_queued_msg yields each message on this instances readq
|
139
|
-
#
|
140
|
-
# - messages are added to the readq by #read_loop
|
141
|
-
# - iteration ends when the instance itself is added
|
142
|
-
def each_queued_msg
|
143
|
-
return enum_for(:each_queued_msg) unless block_given?
|
144
|
-
count = 0
|
145
|
-
loop do
|
146
|
-
GRPC.logger.debug("each_queued_msg: waiting##{count}")
|
147
|
-
count += 1
|
148
|
-
req = @readq.pop
|
149
|
-
GRPC.logger.debug("each_queued_msg: req = #{req}")
|
150
|
-
fail req if req.is_a? StandardError
|
151
|
-
break if req.equal?(END_OF_READS)
|
152
|
-
yield req
|
153
|
-
end
|
154
|
-
end
|
155
|
-
|
156
135
|
def write_loop(requests, is_client: true)
|
157
136
|
GRPC.logger.debug('bidi-write-loop: starting')
|
158
137
|
count = 0
|
@@ -190,47 +169,45 @@ module GRPC
|
|
190
169
|
raise e
|
191
170
|
end
|
192
171
|
|
193
|
-
#
|
194
|
-
def
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
@readq.push(END_OF_READS)
|
217
|
-
GRPC.logger.debug('bidi-read-loop: done reading!')
|
218
|
-
break
|
172
|
+
# Provides an enumerator that yields results of remote reads
|
173
|
+
def read_loop(is_client: true)
|
174
|
+
return enum_for(:read_loop,
|
175
|
+
is_client: is_client) unless block_given?
|
176
|
+
GRPC.logger.debug('bidi-read-loop: starting')
|
177
|
+
begin
|
178
|
+
count = 0
|
179
|
+
# queue the initial read before beginning the loop
|
180
|
+
loop do
|
181
|
+
GRPC.logger.debug("bidi-read-loop: #{count}")
|
182
|
+
count += 1
|
183
|
+
batch_result = read_using_run_batch
|
184
|
+
|
185
|
+
# handle the next message
|
186
|
+
if batch_result.message.nil?
|
187
|
+
GRPC.logger.debug("bidi-read-loop: null batch #{batch_result}")
|
188
|
+
|
189
|
+
if is_client
|
190
|
+
batch_result = @call.run_batch(RECV_STATUS_ON_CLIENT => nil)
|
191
|
+
@call.status = batch_result.status
|
192
|
+
batch_result.check_status
|
193
|
+
GRPC.logger.debug("bidi-read-loop: done status #{@call.status}")
|
219
194
|
end
|
220
195
|
|
221
|
-
|
222
|
-
|
223
|
-
@readq.push(res)
|
196
|
+
GRPC.logger.debug('bidi-read-loop: done reading!')
|
197
|
+
break
|
224
198
|
end
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
@readq.push(e) # let each_queued_msg terminate with this error
|
199
|
+
|
200
|
+
res = @unmarshal.call(batch_result.message)
|
201
|
+
yield res
|
229
202
|
end
|
230
|
-
|
231
|
-
|
232
|
-
|
203
|
+
rescue StandardError => e
|
204
|
+
GRPC.logger.warn('bidi: read-loop failed')
|
205
|
+
GRPC.logger.warn(e)
|
206
|
+
raise e
|
233
207
|
end
|
208
|
+
GRPC.logger.debug('bidi-read-loop: finished')
|
209
|
+
@reads_complete = true
|
210
|
+
finished
|
234
211
|
end
|
235
212
|
end
|
236
213
|
end
|
data/src/ruby/lib/grpc/grpc_c.so
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- gRPC Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: src/ruby/bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -294,9 +294,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
294
294
|
version: 2.0.0
|
295
295
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
296
296
|
requirements:
|
297
|
-
- - "
|
297
|
+
- - ">="
|
298
298
|
- !ruby/object:Gem::Version
|
299
|
-
version:
|
299
|
+
version: '0'
|
300
300
|
requirements: []
|
301
301
|
rubyforge_project:
|
302
302
|
rubygems_version: 2.5.1
|