def run_async_at(self, where, gen, *args, **kwargs):
"""Must be used with 'yield' as
'rtask = yield computation.run_async_at(where, gen, ...)'
Run given generator function 'gen' with arguments 'args' and 'kwargs' at
remote server 'where'. If the request is successful, 'rtask' will be a
(remote) task; check result with 'isinstance(rtask,
pycos.Task)'. The generator is supposed to be (mostly) I/O bound and
not consume CPU time. Unlike other 'run' variants, tasks created
with 'async' are not "tracked" by scheduler (see online documentation for
more details).
If 'where' is a string, it is assumed to be IP address of a node, in
which case the task is scheduled at that node on a server at that
node. If 'where' is a Location instance, it is assumed to be server
location in which case the task is scheduled at that server.
'gen' must be generator function, as it is used to run task at
remote location.
"""
yield self._run_request('run_async', where, 0, gen, *args, **kwargs)
评论列表
文章目录