[C++-sig] Re: static const object access?

Gavin Doughtie gdoughtie at anim.dreamworks.com
Tue Jun 10 22:15:25 CEST 2003


Happy to help -- I'm not calling PyFinalize() myself. I assume that when 
  Python exits, my static boost::python::object attempts to get the 
interpreter lock in its destructor, but the interpreter has already shut 
down and kablooie...

My current fix is to allocate the static object on the heap and let it 
leak. I quite hate this approach!

Gavin

Dirk Gerrits wrote:
> David Abrahams wrote:
> 
>> Gavin Doughtie <gdoughtie at anim.dreamworks.com> writes:
>>
>>
>>> This does in fact work, but now I get "Fatal Python error:
>>> PyThreadState_Get: no current thread" when the module unloads.
>>>
> [snip]
> 
>>
>> Python extension modules don't unload, AFAIK.  Do you mean
>> PyFinalize()?
>>
>>   Please see: http://aspn.activestate.com/ASPN/Mail/Message/1446109
>>
>> Dirk Gerrits has been working on solving that issue; I'm sure he'd
>> appreciate your help.
>>
> 
> Well I can't really look into the issue anymore for the coming 3 weeks 
> because of final exams. But after that it'll be my top priority. ;) 
> You're most welcome to join in the effort Gavin if you'd like. The 
> thread Dave just mentioned explains where the problem is coming from.
> 
> Regards,
> Dirk Gerrits
> 
> 
> 
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
> 

-- 
Gavin Doughtie
DreamWorks SKG
(818) 695-3821





More information about the Cplusplus-sig mailing list