用法:
next_batch(block=True)
獲取下一批已完成的期貨。
- block:布爾型,可選
如果為 True 則等到我們得到一些結果,否則立即返回,即使是一個空列表。默認為真。
- 期貨或(未來,結果)元組列表
參數:
返回:
例子:
>>> ac = as_completed(futures) >>> client.gather(ac.next_batch()) [4, 1, 3]
>>> client.gather(ac.next_batch(block=False)) []
相關用法
- Python distributed.as_completed.batches用法及代碼示例
- Python distributed.as_completed用法及代碼示例
- Python distributed.active_memory_manager.ActiveMemoryManagerPolicy.run用法及代碼示例
- Python distributed.protocol.serialize.register_generic用法及代碼示例
- Python distributed.Client.gather用法及代碼示例
- Python distributed.recreate_tasks.ReplayTaskClient.recreate_task_locally用法及代碼示例
- Python distributed.diagnostics.plugin.SchedulerPlugin用法及代碼示例
- Python distributed.Client.ncores用法及代碼示例
- Python distributed.Client.retire_workers用法及代碼示例
- Python distributed.Client.unregister_worker_plugin用法及代碼示例
- Python distributed.fire_and_forget用法及代碼示例
- Python distributed.Client.set_metadata用法及代碼示例
- Python distributed.Client.scheduler_info用法及代碼示例
- Python distributed.Client.submit用法及代碼示例
- Python distributed.Client.compute用法及代碼示例
- Python distributed.SpecCluster.scale用法及代碼示例
- Python distributed.get_worker用法及代碼示例
- Python distributed.SpecCluster.scale_up用法及代碼示例
- Python distributed.Client.nthreads用法及代碼示例
- Python distributed.comm.resolve_address用法及代碼示例
注:本文由純淨天空篩選整理自dask.org大神的英文原創作品 distributed.as_completed.next_batch。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。