He Shiming

Shanghai, China

kaoya.com

Age: 33

Creator of Bizble, 雅思听力宝, 考鸭, Toppin'Wiper, MediaMan and Goals.io.

Independent developer of desktop, web, and mobile platforms.

UI designer.

Dec
26
awarded Supporter
Nov
23
awarded Popular Question
Oct
18
revised mongoose document saving is slower than expected, potentially nodejs javascript closure related
edited title
Oct
18
asked mongoose document saving is slower than expected, potentially nodejs javascript closure related
Sep
23
awarded Revival
Sep
12
awarded Tumbleweed
Sep
5
asked Nginx as reverse proxy for GitLab with SSL?
Sep
2
awarded Guru
Aug
26
answered C Language: popen() with fread()?
Aug
21
comment Python, launch concurrent.futures.ProcessPoolExecutor with initialization?
Yes, I can confirm that. It's surprising that the global is per child. I'll take some time to digest and adapt this solution. Thanks for the explanation.
Aug
21
accepted Python, launch concurrent.futures.ProcessPoolExecutor with initialization?
Aug
21
comment Python, launch concurrent.futures.ProcessPoolExecutor with initialization?
But umm... initresult is global. In my case, each child will have to have a separate copy. And I'm not sure if it's picklable, it's not really...
Aug
21
revised Python, launch concurrent.futures.ProcessPoolExecutor with initialization?
added 185 characters in body
Aug
21
comment Python, launch concurrent.futures.ProcessPoolExecutor with initialization?
It might be the problem with wording of my question. But in my case, the function f(x) need to have access to the returned result from initfunc. And each child should have its own copy. I'm not seeing it possible in this implementation.
Aug
21
comment Python, launch concurrent.futures.ProcessPoolExecutor with initialization?
Thanks for the info.
Aug
21
revised Python, launch concurrent.futures.ProcessPoolExecutor with initialization?
added 127 characters in body
Aug
21
comment Python, launch concurrent.futures.ProcessPoolExecutor with initialization?
Well, think of initialization as close to json.load, the 'to-be-parallelized' function is called in an iteration for many times. I don't want it to be re-initialized each time.
Aug
21
asked Python, launch concurrent.futures.ProcessPoolExecutor with initialization?
Aug
11
comment pthread_cond_wait sometimes will not receive the signal
Hello again, I noticed you used a blocking while loop to watch for work_status variable change. Is this mandatory? Won't this maxout CPU when no job is available?
Aug
11
accepted pthread_cond_wait sometimes will not receive the signal
1 2 3 4 5