equal
deleted
inserted
replaced
238 pycompat.future_set_exception_info(f, sys.exc_info()[1:]) |
238 pycompat.future_set_exception_info(f, sys.exc_info()[1:]) |
239 return |
239 return |
240 |
240 |
241 # Encoded arguments and future holding remote result. |
241 # Encoded arguments and future holding remote result. |
242 try: |
242 try: |
243 encodedargs, fremote = next(batchable) |
243 encargsorres, fremote = next(batchable) |
244 except Exception: |
244 except Exception: |
245 pycompat.future_set_exception_info(f, sys.exc_info()[1:]) |
245 pycompat.future_set_exception_info(f, sys.exc_info()[1:]) |
246 return |
246 return |
247 |
247 |
248 requests.append((command, encodedargs)) |
248 if not fremote: |
249 states.append((command, f, batchable, fremote)) |
249 f.set_result(encargsorres) |
|
250 else: |
|
251 requests.append((command, encargsorres)) |
|
252 states.append((command, f, batchable, fremote)) |
250 |
253 |
251 if not requests: |
254 if not requests: |
252 return |
255 return |
253 |
256 |
254 # This will emit responses in order they were executed. |
257 # This will emit responses in order they were executed. |