Merge "py37: drop use of 'async' as parameter name"
This commit is contained in:
commit
1f0682bc59
@ -57,7 +57,7 @@ class DealerPublisherDirect(zmq_dealer_publisher_base.DealerPublisherBase):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, conf, matchmaker):
|
def __init__(self, conf, matchmaker):
|
||||||
sender = zmq_senders.RequestSenderDirect(conf, async=True)
|
sender = zmq_senders.RequestSenderDirect(conf, use_async=True)
|
||||||
receiver = zmq_receivers.ReceiverDirect(conf)
|
receiver = zmq_receivers.ReceiverDirect(conf)
|
||||||
super(DealerPublisherDirect, self).__init__(conf, matchmaker,
|
super(DealerPublisherDirect, self).__init__(conf, matchmaker,
|
||||||
sender, receiver)
|
sender, receiver)
|
||||||
|
@ -31,9 +31,9 @@ zmq = zmq_async.import_zmq()
|
|||||||
class SenderBase(object):
|
class SenderBase(object):
|
||||||
"""Base request/response sending interface."""
|
"""Base request/response sending interface."""
|
||||||
|
|
||||||
def __init__(self, conf, async=False):
|
def __init__(self, conf, use_async=False):
|
||||||
self.conf = conf
|
self.conf = conf
|
||||||
self.async = async
|
self.use_async = use_async
|
||||||
self._lock = threading.Lock()
|
self._lock = threading.Lock()
|
||||||
self._send_versions = zmq_version.get_method_versions(self, 'send')
|
self._send_versions = zmq_version.get_method_versions(self, 'send')
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ class RequestSenderDirect(RequestSenderBase):
|
|||||||
"msg_version": request.message_version})
|
"msg_version": request.message_version})
|
||||||
|
|
||||||
def _send_v_1_0(self, socket, request):
|
def _send_v_1_0(self, socket, request):
|
||||||
flags = zmq.NOBLOCK if self.async else 0
|
flags = zmq.NOBLOCK if self.use_async else 0
|
||||||
socket.send(b'', zmq.SNDMORE | flags)
|
socket.send(b'', zmq.SNDMORE | flags)
|
||||||
socket.send_string('1.0', zmq.SNDMORE | flags)
|
socket.send_string('1.0', zmq.SNDMORE | flags)
|
||||||
socket.send(six.b(str(request.msg_type)), zmq.SNDMORE | flags)
|
socket.send(six.b(str(request.msg_type)), zmq.SNDMORE | flags)
|
||||||
|
Loading…
Reference in New Issue
Block a user