Show More
@@ -308,7 +308,7 b' class StreamSession(object):' | |||||
308 | if isinstance(socket, ZMQStream): |
|
308 | if isinstance(socket, ZMQStream): | |
309 | socket = socket.socket |
|
309 | socket = socket.socket | |
310 | try: |
|
310 | try: | |
311 | msg = socket.recv_multipart(mode) |
|
311 | msg = socket.recv_multipart(mode, copy=copy) | |
312 | except zmq.ZMQError as e: |
|
312 | except zmq.ZMQError as e: | |
313 | if e.errno == zmq.EAGAIN: |
|
313 | if e.errno == zmq.EAGAIN: | |
314 | # We can convert EAGAIN to None as we know in this case |
|
314 | # We can convert EAGAIN to None as we know in this case |
@@ -315,10 +315,13 b' def unpack_apply_message(bufs, g=None, copy=True):' | |||||
315 | if sa.data is None: |
|
315 | if sa.data is None: | |
316 | m = bufs.pop(0) |
|
316 | m = bufs.pop(0) | |
317 | if sa.getTypeDescriptor() in ('buffer', 'ndarray'): |
|
317 | if sa.getTypeDescriptor() in ('buffer', 'ndarray'): | |
318 | if copy: |
|
318 | # always use a buffer, until memoryviews get sorted out | |
319 |
|
|
319 | sa.data = buffer(m) | |
320 | else: |
|
320 | # disable memoryview support | |
321 | sa.data = m.buffer |
|
321 | # if copy: | |
|
322 | # sa.data = buffer(m) | |||
|
323 | # else: | |||
|
324 | # sa.data = m.buffer | |||
322 | else: |
|
325 | else: | |
323 | if copy: |
|
326 | if copy: | |
324 | sa.data = m |
|
327 | sa.data = m | |
@@ -332,10 +335,13 b' def unpack_apply_message(bufs, g=None, copy=True):' | |||||
332 | if sa.data is None: |
|
335 | if sa.data is None: | |
333 | m = bufs.pop(0) |
|
336 | m = bufs.pop(0) | |
334 | if sa.getTypeDescriptor() in ('buffer', 'ndarray'): |
|
337 | if sa.getTypeDescriptor() in ('buffer', 'ndarray'): | |
335 | if copy: |
|
338 | # always use a buffer, until memoryviews get sorted out | |
336 |
|
|
339 | sa.data = buffer(m) | |
337 | else: |
|
340 | # disable memoryview support | |
338 | sa.data = m.buffer |
|
341 | # if copy: | |
|
342 | # sa.data = buffer(m) | |||
|
343 | # else: | |||
|
344 | # sa.data = m.buffer | |||
339 | else: |
|
345 | else: | |
340 | if copy: |
|
346 | if copy: | |
341 | sa.data = m |
|
347 | sa.data = m |
General Comments 0
You need to be logged in to leave comments.
Login now