On Wed, Oct 29, 2008 at 2:53 PM, Stefan Behnel <[EMAIL PROTECTED]> wrote: > > I'm fine with calling InitThread() when "with nogil" or "with gil" is used > anywhere in the source.
OK > And I think it should be left to the users to handle > all other cases themselves. Here I'm not following you. What other cases are you talking about? > Also note that UtilityCode() accepts a keyword "init", so you can just put the > call to InitThreads() in there and it will do the right thing. I think the > "proto" can be dropped completely in this case. Yes, I reviewed the code you recently pushed. But the "init" (if I got it right) seems to be intended for initializing global variables. So I was not sure if using "init" was strictly correct. Moreover, if you look carefully at my path, you will find that the "proto" stuff starts with "ifndef __PYX_FORCE_INIT_THREADS", just in case uses want to pass this flag to the C compiler a -D__PYX_FORCE_INIT_THREADS=1/0 to force/skip the hardwired call. For example, if you suspect that Py2.4.1 could have the same problem, then you could try do pass -D__PYX_FORCE_INIT_THREADS=1 and see what happens. But if you think the above stuff is just a nonsense, and we should just uncondionally make the PyEval_InitThread() call in the Py2.3 case, just let me know and I'll write that like you want. -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
