Show More
@@ -344,6 +344,7 class ipeercommandexecutor(Protocol): | |||||
344 | outstanding requests are waited on. |
|
344 | outstanding requests are waited on. | |
345 | """ |
|
345 | """ | |
346 |
|
346 | |||
|
347 | @abc.abstractmethod | |||
347 | def callcommand(self, name, args): |
|
348 | def callcommand(self, name, args): | |
348 | """Request that a named command be executed. |
|
349 | """Request that a named command be executed. | |
349 |
|
350 | |||
@@ -366,6 +367,7 class ipeercommandexecutor(Protocol): | |||||
366 | until all command requests have been issued. |
|
367 | until all command requests have been issued. | |
367 | """ |
|
368 | """ | |
368 |
|
369 | |||
|
370 | @abc.abstractmethod | |||
369 | def sendcommands(self): |
|
371 | def sendcommands(self): | |
370 | """Trigger submission of queued command requests. |
|
372 | """Trigger submission of queued command requests. | |
371 |
|
373 | |||
@@ -376,6 +378,7 class ipeercommandexecutor(Protocol): | |||||
376 | When called, no more new commands may be issued with this executor. |
|
378 | When called, no more new commands may be issued with this executor. | |
377 | """ |
|
379 | """ | |
378 |
|
380 | |||
|
381 | @abc.abstractmethod | |||
379 | def close(self): |
|
382 | def close(self): | |
380 | """Signal that this command request is finished. |
|
383 | """Signal that this command request is finished. | |
381 |
|
384 |
@@ -258,7 +258,7 moderncaps = { | |||||
258 | legacycaps = moderncaps.union({b'changegroupsubset'}) |
|
258 | legacycaps = moderncaps.union({b'changegroupsubset'}) | |
259 |
|
259 | |||
260 |
|
260 | |||
261 |
class localcommandexecutor: |
|
261 | class localcommandexecutor(repository.ipeercommandexecutor): | |
262 | def __init__(self, peer): |
|
262 | def __init__(self, peer): | |
263 | self._peer = peer |
|
263 | self._peer = peer | |
264 | self._sent = False |
|
264 | self._sent = False |
@@ -107,8 +107,7 class unsentfuture(futures.Future): | |||||
107 | return self.result(timeout) |
|
107 | return self.result(timeout) | |
108 |
|
108 | |||
109 |
|
109 | |||
110 |
|
|
110 | class peerexecutor(repository.ipeercommandexecutor): | |
111 | class peerexecutor: |
|
|||
112 | def __init__(self, peer): |
|
111 | def __init__(self, peer): | |
113 | self._peer = peer |
|
112 | self._peer = peer | |
114 | self._sent = False |
|
113 | self._sent = False |
General Comments 0
You need to be logged in to leave comments.
Login now