Javen Wang <jave...@gmail.com> added the comment: I'm quite certain that the makefile is generated before the "make" program is launched in separated process. Follow is the original code where the makefile is created (line 14) and a task is put in queue (line 19). It's executed in the main thread (no parallel execution here). There's no way that the process is launched before the makefile generation. 01 for Module in Pa.Platform.Modules: 02 Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile) 03 if Ma == None: 04 continue 05 # generate AutoGen files and Makefile here 06 if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']: 07 # for target which must generate AutoGen code and makefile 08 if not self.SkipAutoGen or self.Target == 'genc': 09 Ma.CreateCodeFile(True) 10 if self.Target == "genc": 11 continue 12 13 if not self.SkipAutoGen or self.Target == 'genmake': 14 Ma.CreateMakeFile(True) 15 if self.Target == "genmake": 16 continue 17 18 # Generate build task for the module which will be launched separately 19 Bt = BuildTask.New(ModuleMakeUnit(Ma, self.Target))
I think the Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS should not be used for fsync in the Python core code (in posixmodule.c, right?). Because fsync is mostly used to solve file operation issue in parallel execution context, it should not give out CPU time to other threads or processes when it's running. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4944> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com