- Bugfix
This commit is contained in:
@@ -81,7 +81,10 @@ class SharedMemory(UserDict):
|
|||||||
def garbage_collect(self):
|
def garbage_collect(self):
|
||||||
""" clean up the cache """
|
""" clean up the cache """
|
||||||
for item_id in set(self.cache) - set(self.data.keys()):
|
for item_id in set(self.cache) - set(self.data.keys()):
|
||||||
self.references[item_id] -= 1
|
if item_id in self.references:
|
||||||
|
self.references[item_id] -= 1
|
||||||
|
else:
|
||||||
|
self.references[item_id] = 0
|
||||||
if self.trash_can is not None and item_id not in self.trash_can:
|
if self.trash_can is not None and item_id not in self.trash_can:
|
||||||
self.trash_can[item_id] = self.cache[item_id]
|
self.trash_can[item_id] = self.cache[item_id]
|
||||||
del self.cache[item_id]
|
del self.cache[item_id]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "parfor"
|
name = "parfor"
|
||||||
version = "2023.11.0"
|
version = "2023.11.1"
|
||||||
description = "A package to mimic the use of parfor as done in Matlab."
|
description = "A package to mimic the use of parfor as done in Matlab."
|
||||||
authors = ["Wim Pomp <wimpomp@gmail.com>"]
|
authors = ["Wim Pomp <wimpomp@gmail.com>"]
|
||||||
license = "GPLv3"
|
license = "GPLv3"
|
||||||
|
|||||||
Reference in New Issue
Block a user