grpc 1.0.0.pre2-x86-mingw32 → 1.0.0-x86-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: d30644d10c6303aadcc3f41b0f1043974ce6dc17
|
4
|
+
data.tar.gz: d1cbc38c59e46b1df714fb0d8146bd97091425fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26d336f9d9913721041956dd173000f01bf1932ac6a569db3eb748042d69431133133288f83d2e867ec99387414047f5b9e6664551958f278b8f19b2c649b3f4
|
7
|
+
data.tar.gz: 3c242ead91c7e5ed38ade7a751ea0f066d916416580f7775a83c05d42661a3f4f851e3fee50270be88dd83ec6bf3b965d1b447b3f63282e5a51edb8fded05b1d
|
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: x86-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
|