Show More
@@ -93,6 +93,8 class unsentfuture(futures.Future): | |||||
93 | call ``sendcommands()``. |
|
93 | call ``sendcommands()``. | |
94 | """ |
|
94 | """ | |
95 |
|
95 | |||
|
96 | _peerexecutor: "peerexecutor" | |||
|
97 | ||||
96 | def result(self, timeout=None): |
|
98 | def result(self, timeout=None): | |
97 | if self.done(): |
|
99 | if self.done(): | |
98 | return futures.Future.result(self, timeout) |
|
100 | return futures.Future.result(self, timeout) | |
@@ -105,7 +107,7 class unsentfuture(futures.Future): | |||||
105 | return self.result(timeout) |
|
107 | return self.result(timeout) | |
106 |
|
108 | |||
107 |
|
109 | |||
108 | @interfaceutil.implementer(repository.ipeercommandexecutor) |
|
110 | # @interfaceutil.implementer(repository.ipeercommandexecutor) | |
109 | class peerexecutor: |
|
111 | class peerexecutor: | |
110 | def __init__(self, peer): |
|
112 | def __init__(self, peer): | |
111 | self._peer = peer |
|
113 | self._peer = peer | |
@@ -275,6 +277,9 class peerexecutor: | |||||
275 | try: |
|
277 | try: | |
276 | self._responsef.result() |
|
278 | self._responsef.result() | |
277 | finally: |
|
279 | finally: | |
|
280 | # Help pytype- this is initialized by self.sendcommands(), called | |||
|
281 | # above. | |||
|
282 | assert self._responseexecutor is not None | |||
278 | self._responseexecutor.shutdown(wait=True) |
|
283 | self._responseexecutor.shutdown(wait=True) | |
279 | self._responsef = None |
|
284 | self._responsef = None | |
280 | self._responseexecutor = None |
|
285 | self._responseexecutor = None |
General Comments 0
You need to be logged in to leave comments.
Login now