未验证 提交 2e9e8c05 编写于 作者: C Chen Weihang 提交者: GitHub

add platform limit for cleanup function, test=develop (#22846)

上级 1a533ed2
...@@ -137,7 +137,9 @@ class CleanupFuncRegistrar(): ...@@ -137,7 +137,9 @@ class CleanupFuncRegistrar():
# BlockingQueue) may not be completely released, resulting in the corresponding # BlockingQueue) may not be completely released, resulting in the corresponding
# memory-mapped file remaining on the disk (/dev/shm), so register this function # memory-mapped file remaining on the disk (/dev/shm), so register this function
# to clean up shared memory objects in these two queues before the python interpreter exits. # to clean up shared memory objects in these two queues before the python interpreter exits.
CleanupFuncRegistrar.register(_cleanup) # NOTE: Currently multi-process DataLoader only supports Linux platform
if not (sys.platform == 'darwin' or sys.platform == 'win32'):
CleanupFuncRegistrar.register(_cleanup)
class DataLoaderBase(object): class DataLoaderBase(object):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册