ãªãã¸ã§ã¯ãæåããã°ã©ãã³ã°ï¼multiprocessing.Poolã§ã®ä¸¦åå¦çã§ãããã¾ããã ã¯ã©ã¹ã®ä¸ã§Poolã©ã¤ã¯ãªææ³ã§ä¸¦åæ¼ç®ãè¡ãªããã¨ã®ã§ããMyPoolãèªä½ããã®ã§ãã®ç´¹ä»ã§ãã Pythonã§ã®ä¸¦åå¦çã«ã¤ã㦠Pythonã«ã¯ver2.6以éããmultiprocessingã¨ãã便å©ãªãã®ãããã¾ãã ããã®Poolã¨ããæ©è½ã使ãã¨ã test.py # -*- coding: utf-8 -*- from multiprocessing import Pool def fuga(x): # 並åå®è¡ãããé¢æ° return x*x def hoge(): p = Pool(8) # 8ã¹ã¬ããã§å®è¡ print p.map(fuga, range(10)) # fugaã«0,1,..ã®ãããããä¸ãã¦ä¸¦åæ¼ç® if __name__ == "__main
{{#tags}}- {{label}}
{{/tags}}