[C++-sig] Re: Any way of executing something on unload of a Boost.Python module?
Niall Douglas
s_sourceforge at nedprod.com
Fri Sep 26 00:58:02 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 25 Sep 2003 at 16:29, David Abrahams wrote:
> > Wow! You all might not quite appreciate how much this means to me.
> > More than a month of labouring part-time and it finally all works!
>
> *That's* called "working?" I guess if you're happy, I'm happy.
I always say error handling is the beginning of all good coding!
> > The single caveat is that the randomness thread you see started
> > above gets terminated when you unload the module (I'd much prefer a
> > chance to shut it down nicely). I can't find anything in the docs
> > about how to do this.
>
> ?? Python extension modules are never unloaded.
>
> Do you mean you're calling Py_Finalize()? Because that's not
> supported by Boost.Python (yet).
No, I was doing Ctrl + Z and Return.
I looked around the call stack in MSVC and I think python's console
control handler is immediately calling ExitProcess() which dooms any
threads currently running. Shame as now I'll have to wrap the python
interpreter in other code so cleanups can be invoked correctly.
Cheers,
Niall
-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2
iQA/AwUBP3Ny+sEcvDLFGKbPEQKXgQCfbOePVc8dGy/93tlT7ALvL7KV6+YAnjvZ
1X5I2k9V3a/Prf4BnrR3Htn5
=A57h
-----END PGP SIGNATURE-----
More information about the Cplusplus-sig
mailing list