浏览代码

priority pool

Your Name 2 年之前
父节点
当前提交
084d565845
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      tests/test_priority_pool.py

+ 2 - 1
tests/test_priority_pool.py

@@ -13,7 +13,8 @@ def test_priority_pools():
     outputs_queue = mp.SimpleQueue()
     outputs_queue = mp.SimpleQueue()
     results_valid = mp.Event()
     results_valid = mp.Event()
 
 
-    def dummy_pool_func(x):
+    def dummy_pool_func(args, kwargs):
+        (x,) = args  # TODO modify the PriorityPool code such that dummy_pool_func can accept x directly
         time.sleep(0.1)
         time.sleep(0.1)
         y = x**2
         y = x**2
         outputs_queue.put((x, y))
         outputs_queue.put((x, y))