浏览代码

Fix waiting until free memory is available (#136)

Alexander Borzunov 2 年之前
父节点
当前提交
318d690a5c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/petals/server/cache.py

+ 1 - 1
src/petals/server/cache.py

@@ -77,7 +77,7 @@ class MemoryCache:
             async with hivemind.utils.enter_asynchronously(self._lock_acquire_memory):
             async with hivemind.utils.enter_asynchronously(self._lock_acquire_memory):
                 if self.current_size_bytes + allocated_size_bytes > self.max_size_bytes:
                 if self.current_size_bytes + allocated_size_bytes > self.max_size_bytes:
                     await loop.run_in_executor(
                     await loop.run_in_executor(
-                        None, self._wait_until_available, allocated_size_bytes, timeout=self.alloc_timeout
+                        None, self._wait_until_available, allocated_size_bytes, self.alloc_timeout
                     )
                     )
                 async with hivemind.utils.enter_asynchronously(self._lock_metadata):
                 async with hivemind.utils.enter_asynchronously(self._lock_metadata):
                     allocated_handle = int(self.handle_counter)
                     allocated_handle = int(self.handle_counter)