On Nov 15, 5:03 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Thu, 15 Nov 2007 16:18:45 -0300, <[EMAIL PROTECTED]> escribió:
>
> > On Nov 15, 9:43 am, [EMAIL PROTECTED] wrote:
> >> On Nov 14, 4:20 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
> >> wrote:
>
> >> > Not forcibly - you need som
En Thu, 15 Nov 2007 16:18:45 -0300, <[EMAIL PROTECTED]> escribió:
> On Nov 15, 9:43 am, [EMAIL PROTECTED] wrote:
>> On Nov 14, 4:20 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
>> wrote:
>>
>> > Not forcibly - you need some cooperation from the Main function. Maybe
>> > setting a global variable th
On Nov 15, 9:43 am, [EMAIL PROTECTED] wrote:
> On Nov 14, 4:20 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>
> > Not forcibly - you need some cooperation from the Main function. Maybe
> > setting a global variable that Main checks periodically.
>
> Thanks. I'll give that a try!
>
> Andy
I
On Nov 14, 4:20 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> Not forcibly - you need some cooperation from the Main function. Maybe
> setting a global variable that Main checks periodically.
Thanks. I'll give that a try!
Andy
--
http://mail.python.org/mailman/listinfo/python-list
En Wed, 14 Nov 2007 20:02:42 -0300, <[EMAIL PROTECTED]> escribió:
> The problem is that the function "Main" in the Python script can take
> up to 60 seconds to execute. How can I terminate this thread (and
> therefore the Main function in python) cleanly from the primary thread
> of my application
I embed multiple interpreters. I create the interpreter and modules in
the primary thread of my application:
PyEval_AcquireLock();
thread = Py_NewInterpreter();
PyThreadState_Swap(thread);
...initialize modules, etc
PyThreadState_Swap(maininterpreter);
PyEval_ReleaseLock();
Then I create a