[Zope-dev] ZODB, Threads and Persistence
Magnus Heino (Rivermen)
magnus.heino@rivermen.se
Fri, 10 Nov 2000 16:35:32 +0100
Hi.
Reading from Jims 'Introduction to the Zope Database':
"An object's state may be freed at any time by the ZODB to conserve memory
usage."
What does this mean? That the object can be freed even though there are
references to it?
The reason I'm asking is becase I want to use threads and persistence
together.
I would like to inherit both threading.Thread and Persistence.Persistent,
but that gives an error. I guess thats because of the ExtentionClass.
However, if i only inherit Persistence.Persistent and starts a thread using
the thread module withing the persistent class, what will happen with it?
Can the ZODB still decide to free my persistent object even thoght it has a
reference to a thread that is running??
Or can I start my thread when the object first is used, and rely on that it
will be running until I stop it or remove any reference to it?
/Magnus