From fffe070e3028b47479aefd712e6959ebc3123387 Mon Sep 17 00:00:00 2001 From: Roberto De Ioris Date: Mon, 22 Oct 2012 09:41:24 +0200 Subject: [PATCH] use threaded build only on build_uwsgi() --- uwsgiconfig.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/uwsgiconfig.py b/uwsgiconfig.py index 29005b8b..32a56031 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -101,14 +101,6 @@ def thread_compiler(num): return -if CPUCOUNT > 1: - print_lock = Lock() - compile_queue = Queue(maxsize=CPUCOUNT) - for i in range(0,CPUCOUNT): - t = Thread(target=thread_compiler,args=(i,)) - t.daemon = True - t.start() - thread_compilers.append(t) def binarize(name): @@ -219,6 +211,15 @@ def build_uwsgi(uc, print_only=False): gcc_list, cflags, ldflags, libs = uc.get_gcll() + if CPUCOUNT > 1: + print_lock = Lock() + compile_queue = Queue(maxsize=CPUCOUNT) + for i in range(0,CPUCOUNT): + t = Thread(target=thread_compiler,args=(i,)) + t.daemon = True + t.start() + thread_compilers.append(t) + if uc.get('embedded_plugins'): ep = uc.get('embedded_plugins').split(',') epc = "-DUWSGI_DECLARE_EMBEDDED_PLUGINS=\""