equal
deleted
inserted
replaced
8 |
8 |
9 from __future__ import absolute_import |
9 from __future__ import absolute_import |
10 |
10 |
11 from . import ( |
11 from . import ( |
12 error, |
12 error, |
|
13 pycompat, |
13 util, |
14 util, |
14 ) |
15 ) |
15 |
16 |
16 # abstract batching support |
17 # abstract batching support |
17 |
18 |
90 batchable = f(*args, **opts) |
91 batchable = f(*args, **opts) |
91 encargsorres, encresref = next(batchable) |
92 encargsorres, encresref = next(batchable) |
92 if not encresref: |
93 if not encresref: |
93 return encargsorres # a local result in this case |
94 return encargsorres # a local result in this case |
94 self = args[0] |
95 self = args[0] |
95 encresref.set(self._submitone(f.__name__, encargsorres)) |
96 cmd = pycompat.bytesurl(f.__name__) # ensure cmd is ascii bytestr |
|
97 encresref.set(self._submitone(cmd, encargsorres)) |
96 return next(batchable) |
98 return next(batchable) |
97 setattr(plain, 'batchable', f) |
99 setattr(plain, 'batchable', f) |
98 return plain |
100 return plain |