久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <small id='Vp6r2'></small><noframes id='Vp6r2'>

      <bdo id='Vp6r2'></bdo><ul id='Vp6r2'></ul>
    <legend id='Vp6r2'><style id='Vp6r2'><dir id='Vp6r2'><q id='Vp6r2'></q></dir></style></legend>

    <tfoot id='Vp6r2'></tfoot>
  • <i id='Vp6r2'><tr id='Vp6r2'><dt id='Vp6r2'><q id='Vp6r2'><span id='Vp6r2'><b id='Vp6r2'><form id='Vp6r2'><ins id='Vp6r2'></ins><ul id='Vp6r2'></ul><sub id='Vp6r2'></sub></form><legend id='Vp6r2'></legend><bdo id='Vp6r2'><pre id='Vp6r2'><center id='Vp6r2'></center></pre></bdo></b><th id='Vp6r2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Vp6r2'><tfoot id='Vp6r2'></tfoot><dl id='Vp6r2'><fieldset id='Vp6r2'></fieldset></dl></div>

        “塊大小"multiprocessing.Pool.map 中的參數

        quot;chunksizequot; parameter in multiprocessing.Pool.map(“塊大小multiprocessing.Pool.map 中的參數)
        1. <tfoot id='0ASOX'></tfoot>
          <i id='0ASOX'><tr id='0ASOX'><dt id='0ASOX'><q id='0ASOX'><span id='0ASOX'><b id='0ASOX'><form id='0ASOX'><ins id='0ASOX'></ins><ul id='0ASOX'></ul><sub id='0ASOX'></sub></form><legend id='0ASOX'></legend><bdo id='0ASOX'><pre id='0ASOX'><center id='0ASOX'></center></pre></bdo></b><th id='0ASOX'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='0ASOX'><tfoot id='0ASOX'></tfoot><dl id='0ASOX'><fieldset id='0ASOX'></fieldset></dl></div>
            <bdo id='0ASOX'></bdo><ul id='0ASOX'></ul>
              <tbody id='0ASOX'></tbody>

            <small id='0ASOX'></small><noframes id='0ASOX'>

          • <legend id='0ASOX'><style id='0ASOX'><dir id='0ASOX'><q id='0ASOX'></q></dir></style></legend>

                • 本文介紹了“塊大小"multiprocessing.Pool.map 中的參數的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  例如,如果我有一個帶有 2 個處理器的池對象:

                  If I have a pool object with 2 processors for example:

                  p=multiprocessing.Pool(2)
                  

                  我想遍歷目錄中的文件列表并使用 map 函數

                  and I want to iterate over a list of files on directory and use the map function

                  誰能解釋一下這個函數的塊大小是多少:

                  could someone explain what is the chunksize of this function:

                  p.map(func, iterable[, chunksize])
                  

                  如果我將 chunksize 例如設置為 10,這是否意味著每 10 個文件都應該使用一個處理器進行處理?

                  If I set the chunksize for example to 10 does that means every 10 files should be processed with one processor?

                  推薦答案

                  看Pool.map 的文檔 看來您幾乎是正確的: chunksize 參數將導致可迭代對象被拆分為大約該大小,并且每件作品都作為單獨的任務提交.

                  Looking at the documentation for Pool.map it seems you're almost correct: the chunksize parameter will cause the iterable to be split into pieces of approximately that size, and each piece is submitted as a separate task.

                  所以在您的示例中,是的,map 將采用前 10 個(大約),將其作為單個處理器的任務提交......然后接下來的 10 個將作為另一個任務提交,等等.請注意,這并不意味著這會使處理器每 10 個文件交替一次,很有可能處理器 #1 最終得到 1-10 和 11-20,而處理器 #2 得到 21-30 和 31-40.

                  So in your example, yes, map will take the first 10 (approximately), submit it as a task for a single processor... then the next 10 will be submitted as another task, and so on. Note that it doesn't mean that this will make the processors alternate every 10 files, it's quite possible that processor #1 ends up getting 1-10 AND 11-20, and processor #2 gets 21-30 and 31-40.

                  這篇關于“塊大小"multiprocessing.Pool.map 中的參數的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  What exactly is Python multiprocessing Module#39;s .join() Method Doing?(Python 多處理模塊的 .join() 方法到底在做什么?)
                  Passing multiple parameters to pool.map() function in Python(在 Python 中將多個參數傳遞給 pool.map() 函數)
                  multiprocessing.pool.MaybeEncodingError: #39;TypeError(quot;cannot serialize #39;_io.BufferedReader#39; objectquot;,)#39;(multiprocessing.pool.MaybeEncodingError: TypeError(cannot serialize _io.BufferedReader object,)) - IT屋-程序員軟件開
                  Python Multiprocess Pool. How to exit the script when one of the worker process determines no more work needs to be done?(Python 多進程池.當其中一個工作進程確定不再需要完成工作時,如何退出腳本?) - IT屋-程序員
                  How do you pass a Queue reference to a function managed by pool.map_async()?(如何將隊列引用傳遞給 pool.map_async() 管理的函數?)
                  yet another confusion with multiprocessing error, #39;module#39; object has no attribute #39;f#39;(與多處理錯誤的另一個混淆,“模塊對象沒有屬性“f)

                        <tbody id='K5sBC'></tbody>
                      • <i id='K5sBC'><tr id='K5sBC'><dt id='K5sBC'><q id='K5sBC'><span id='K5sBC'><b id='K5sBC'><form id='K5sBC'><ins id='K5sBC'></ins><ul id='K5sBC'></ul><sub id='K5sBC'></sub></form><legend id='K5sBC'></legend><bdo id='K5sBC'><pre id='K5sBC'><center id='K5sBC'></center></pre></bdo></b><th id='K5sBC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='K5sBC'><tfoot id='K5sBC'></tfoot><dl id='K5sBC'><fieldset id='K5sBC'></fieldset></dl></div>
                        1. <tfoot id='K5sBC'></tfoot>

                          <small id='K5sBC'></small><noframes id='K5sBC'>

                        2. <legend id='K5sBC'><style id='K5sBC'><dir id='K5sBC'><q id='K5sBC'></q></dir></style></legend>
                            <bdo id='K5sBC'></bdo><ul id='K5sBC'></ul>

                            主站蜘蛛池模板: 精品中文字幕在线观看 | 91天堂 | 91视频一区二区三区 | 亚洲国产成人精品女人久久久 | 日批日韩在线观看 | 麻豆一区一区三区四区 | 国产高清在线精品 | 欧美一区二区在线播放 | 男女视频在线观看网站 | 久久精品久久久久久 | 手机在线观看av | japanhd成人| 欧美日韩不卡合集视频 | 久久免费精彩视频 | 午夜影院网站 | 久久国产综合 | 91精品国产欧美一区二区 | 国产一区二区观看 | 特级黄一级播放 | 国产成人一区二区三区电影 | 亚洲福利在线视频 | 欧美午夜一区 | 亚洲精品成人在线 | 草樱av | 亚洲一区久久久 | 久久精品99久久 | 99热播精品| 国产精品一二三区 | 久久亚洲精品久久国产一区二区 | 人人性人人性碰国产 | 亚洲视频在线看 | 亚洲成人精品 | 成人不卡视频 | av在线视| 成人精品一区 | 成人综合在线视频 | 欧美日本一区 | 在线欧美a| 国产精品夜间视频香蕉 | 久久久久久久久国产精品 | 亚洲欧美日韩国产综合 |