[Pyrex] pyrex and GIL
Simon Burton
simon at arrowtheory.com
Fri Feb 20 01:30:56 CET 2004
On Thu, 19 Feb 2004 09:25:42 +0100
Andreas Kostyrka <andreas at mtg.co.at> wrote:
> > Assuming you have access to an interpreter object, the typical idiom for
> Well, let's restate it differently ;) Where can I get an interp?
> (I've got the problem of having an embedded Python with Swig, Sip and Pyrex
> mixed. Sip seems releases the GIL, and stores that tstate in an local variable
> I do not have access to later :( )
>
> Andreas
>
While you have the GIL, use PyThreadState_Get() to get the current thread, then
use it's "interp" field.
Simon.
--
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com
More information about the Pyrex
mailing list