From 2ceb981da0cfe56cddbd421d673e4b35d1b7b53a Mon Sep 17 00:00:00 2001 From: Linker Lin Date: Sun, 28 Jul 2013 00:07:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=A3=80=E6=B5=8BCPU?= =?UTF-8?q?=E6=95=B0=E7=9B=AE=EF=BC=8C=E5=90=AF=E5=8A=A8=E5=90=88=E9=80=82?= =?UTF-8?q?=E6=95=B0=E7=9B=AE=E7=9A=84=E8=BF=9B=E7=A8=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/parallel/test_file.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test_file.py b/test/parallel/test_file.py index 8372596..0a5f0fe 100644 --- a/test/parallel/test_file.py +++ b/test/parallel/test_file.py @@ -3,7 +3,8 @@ import sys,time import sys sys.path.append("../../") import jieba -jieba.enable_parallel(4) +import multiprocessing +jieba.enable_parallel(multiprocessing.cpu_count()) url = sys.argv[1] content = open(url,"rb").read()