zoukankan      html  css  js  c++  java
  • Python 协程

    def GenerateProcess():
        filelocal = r'c:Te'
        for i in range(10):
            baiWei = i * 100
            filename = [None] * 100
            filelocalation = [None] * 100
            for j in range(100):
                filename_pre = baiWei + j + 1
                filename[j] = "%s.avi" % filename_pre
                filelocalation[j] = filelocal + "\" + filename[j]
            print filelocalation
            yield multiprocessing.Process(target=upload, args=(filename, filelocalation))
    
    def ExecuteProcess(G):
        h = G.next()
        for i in range(10):
            h.start()
            h = G.send('')
    
    if __name__=='__main__':
    
        a = GenerateProcess()
        ExecuteProcess(a)
  • 相关阅读:
    P3811乘法逆元
    P4549裴蜀定理
    备用代码区
    其他板子整理
    DP
    图论板子整理
    约数
    浅谈假学习假努力
    质数
    P1019 单词接龙
  • 原文地址:https://www.cnblogs.com/haoshine/p/5128455.html
Copyright © 2011-2022 走看看