dispycos_client6.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:pycos 作者: pgiri 项目源码 文件源码
def rtask_save_proc(task=None):
    import os
    import tempfile
    # save data in /tmp/tickdata
    with open(os.path.join(os.sep, tempfile.gettempdir(), 'tickdata'), 'w') as fd:
        while True:
            i, n = yield task.receive()
            if n is None:
                break
            fd.write('%s: %s\n' % (i, n))
    raise StopIteration(0)


# This task runs on client. It gets trend messages from remote task that
# computes moving window average.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号