Re: [ZODB-Dev] Threads and Connections

2006-07-29 Thread Dieter Maurer
Chris S wrote at 2006-7-26 16:03 -0400: ... When a file containing source code is modified, I want to reload it using Python's reload() function, then update classes with the new definitions. I have application-level logic to ensure the objects are in a sane-state during update. The only problem

Re: [ZODB-Dev] Threads and Connections

2006-07-26 Thread Gary Poster
On Jul 26, 2006, at 12:52 PM, Chris McDonough wrote: FWIW I believe by default at least, open ZODB connections are tied to the thread which did the opening (they are returned to a pool when closed and reused, possibly in another thread). And indeed each connection does have a cache;

Re: [ZODB-Dev] Threads and Connections

2006-07-26 Thread Dieter Maurer
Chris S wrote at 2006-7-25 23:40 -0400: The problem is the only objects I need to grab are the ones loaded by other connections. I use Python's garbage collector to track references to instances of classes that have been updated. Use a customized ZODB.Conntection.Connection class instead.

Re: [ZODB-Dev] Threads and Connections

2006-07-26 Thread Chris S
On 7/26/06, Gary Poster [EMAIL PROTECTED] wrote: The reason why I'm doing this is because I'm trying to update the classes of persistent objects loaded into memory. Want to elaborate on this a bit? It sounds like stuff other folks have done, but you might want to give more detail. When a

Re: [ZODB-Dev] Threads and Connections

2006-07-26 Thread Chris S
On 7/26/06, Chris McDonough [EMAIL PROTECTED] wrote: FWIW I believe by default at least, open ZODB connections are tied to the thread which did the opening (they are returned to a pool when closed and reused, possibly in another thread). And indeed each connection does have a cache; caching is

[ZODB-Dev] Threads and Connections

2006-07-21 Thread Chris S
Is it possible to close a connection used in one thread from another thread? My program has a locking mechanism, so I can ensure threads don't use their connection while it's closed, but whenever I try to close one thread's connection from another thread, I get errors like: self.conn.close()