>>>>> "Fred" == Fred L Drake, Jr <fdrake@acm.org> writes: Fred> Useful or not, isn't the basic problem that we haven't Fred> been able to define The Right Thing? Probably so. Fred> I'd certainly expect a module to be able to declare in some Fred> way that it could not be unloaded, or control how it gets Fred> unloaded. Perhaps allow Python modules to define an Fred> __unload__() function; when unload() is called on a module, Fred> the __unload__() is called; if that raises an exception, it Fred> gets propogated, otherwise the unload continues if the Fred> module still exists in sys.modules. Not clear that this Fred> would be useful for extensions. The "unload protocol" would be I think. I.e. extension modules ought to be unloadable if they can cooperate. From the Linux dl*() manpages: dlclose decrements the reference count on the dynamic library handle handle. If the reference count drops to zero and no other loaded libraries use symbols in it, then the dynamic library is unloaded. If the dynamic library exports a routine named _fini, then that routine is called just before the library is unloaded. season-to-tasste-on-your-favorite-OS-bread-l y'rs, -Barry
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4