From aa7835efeeb94a75d54c5e569a0f90fe06513a51 Mon Sep 17 00:00:00 2001 From: guofei <52460041+gfwm2013@users.noreply.github.com> Date: Mon, 21 Sep 2020 13:32:02 +0800 Subject: [PATCH] Correct the error in decorator.py (#27409) test=develop --- python/paddle/reader/decorator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/reader/decorator.py b/python/paddle/reader/decorator.py index aadfb3f49e..91a2a78203 100644 --- a/python/paddle/reader/decorator.py +++ b/python/paddle/reader/decorator.py @@ -42,7 +42,7 @@ import paddle.compat as cpt # For more details, please refer to # https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods # https://bugs.python.org/issue33725 -if sys.version_info >= (3, 8): +if sys.version_info >= (3, 8) and sys.platform == 'darwin': fork_context = multiprocessing.get_context('fork') else: fork_context = multiprocessing -- GitLab