提交 dd458c19 编写于 作者: B barrierye

fix bug in multithread version

上级 dfbe9891
...@@ -37,6 +37,7 @@ import time ...@@ -37,6 +37,7 @@ import time
import func_timeout import func_timeout
import enum import enum
import collections import collections
import copy
class _TimeProfiler(object): class _TimeProfiler(object):
...@@ -630,7 +631,8 @@ class ThreadChannel(Queue.Queue): ...@@ -630,7 +631,8 @@ class ThreadChannel(Queue.Queue):
self._cv.notify_all() self._cv.notify_all()
logging.debug(self._log("multi | {} get data succ!".format(op_name))) logging.debug(self._log("multi | {} get data succ!".format(op_name)))
return resp # reference, read only # return resp # reference, read only
return copy.deepcopy(resp)
def stop(self): def stop(self):
#TODO #TODO
...@@ -987,7 +989,8 @@ class VirtualOp(Op): ...@@ -987,7 +989,8 @@ class VirtualOp(Op):
channel.add_producer(op.name) channel.add_producer(op.name)
self._outputs.append(channel) self._outputs.append(channel)
def _run_with_brpc(self, concurrency_idx, input_channel, output_channels): def _run(self, concurrency_idx, input_channel, output_channels, client_type,
use_future):
op_info_prefix = "[{}|{}]".format(self.name, concurrency_idx) op_info_prefix = "[{}|{}]".format(self.name, concurrency_idx)
log = self._get_log_func(op_info_prefix) log = self._get_log_func(op_info_prefix)
self._is_run = True self._is_run = True
......
...@@ -37,6 +37,7 @@ import time ...@@ -37,6 +37,7 @@ import time
import func_timeout import func_timeout
import enum import enum
import collections import collections
import copy
class _TimeProfiler(object): class _TimeProfiler(object):
...@@ -630,7 +631,8 @@ class ThreadChannel(Queue.Queue): ...@@ -630,7 +631,8 @@ class ThreadChannel(Queue.Queue):
self._cv.notify_all() self._cv.notify_all()
logging.debug(self._log("multi | {} get data succ!".format(op_name))) logging.debug(self._log("multi | {} get data succ!".format(op_name)))
return resp # reference, read only # return resp # reference, read only
return copy.deepcopy(resp)
def stop(self): def stop(self):
#TODO #TODO
...@@ -987,7 +989,8 @@ class VirtualOp(Op): ...@@ -987,7 +989,8 @@ class VirtualOp(Op):
channel.add_producer(op.name) channel.add_producer(op.name)
self._outputs.append(channel) self._outputs.append(channel)
def _run_with_brpc(self, concurrency_idx, input_channel, output_channels): def _run(self, concurrency_idx, input_channel, output_channels, client_type,
use_future):
op_info_prefix = "[{}|{}]".format(self.name, concurrency_idx) op_info_prefix = "[{}|{}]".format(self.name, concurrency_idx)
log = self._get_log_func(op_info_prefix) log = self._get_log_func(op_info_prefix)
self._is_run = True self._is_run = True
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册