Пример #1
0
    def __init__(self, method, args, on_done, *, loop=None):
        '''Initialize a request using the next unique request ID.

        on_done - can be None
        '''
        RPCRequest.__init__(self, method, args, next(self.id_counter))
        Future.__init__(self, loop=loop)
        if on_done:
            self.add_done_callback(on_done)
Пример #2
0
 def __init__(self, *, loop=None):
     '''Create an empty outgoing batch request.  Members can be
     added with add_request and add_notification.'''
     # We don't call RPCBatch.__init__()
     self.items = []
     Future.__init__(self, loop=loop)
Пример #3
0
    def __init__(self, loop, msg_id, sender=None, context=None):
        Future.__init__(self, loop=loop)

        self.future_msg_id = msg_id
        self.future_sender = sender
        self.context = context
Пример #4
0
 def __init__(self, decl):
     Future.__init__(self, loop=runtime._loop)
     self.decl = decl
Пример #5
0
 def __init__(self, factory, *args, loop=None):  # pylint: disable=W0231
     Future.__init__(self, loop=loop)  # pylint: disable=W0233
     self._factory = factory
     self._args = args