Re: Django 1.0.2 Thread safety

2009-07-13 Thread qwcode
>I've hit http://code.djangoproject.com/ticket/10470 on production what's the the symptom when you hit this bug? P.S. I'm wanting to use mod_wsgi in daemon mode with threading to conserve memory. I guess I'll manually update or wait for v1.1 --~--~-~--~~~---~--~~ Y

Re: objects in memory that don't time out?

2009-06-27 Thread qwcode
> Why not just have a global in your view.py? right, after looking through the wsgi doc provided above, I feel ok with doing that now. I just have to be mindful of different instances of the globals can exist across processes. In other frameworks, e.g. Spring for Java, they provide a singleton

Re: objects in memory that don't time out?

2009-06-25 Thread qwcode
> If they are non mutable, is thread safety even an issue? I guess I really wanted to just say "If your intention is to use thread-safe globals..." thanks for your help on this. btw, I guess my question could have been asked in terms of whether a singleton pattern is possible... I saw that someo

Re: objects in memory that don't time out?

2009-06-24 Thread qwcode
> So, as far as question you pose in different thread, look at Python > module global variables. If you don't understand how that helps, then > you don't understand how Python global variables work. Just be aware > of the issues that global variables cause in context of multiprocess > web server

Re: objects in memory that don't time out?

2009-06-24 Thread qwcode
let me give an example suppose I want to store an XSLT template object to be reused over and over to transform xml where can I put it? I don't want to put in the backend cache, right? that times out? --~--~-~--~~~---~--~~ You received this message because you ar

objects in memory that don't time out?

2009-06-24 Thread qwcode
This is a re-phrase of a previous email... trying to trigger an answer using terms that might make more sense to this list. I'm more familiar with java frameworks. Is there a way to have objects persist in memory that don't time out? For example, in cherrypy, there's an Application object that

Re: application scope objects? (maybe need cherrypy instead)

2009-06-24 Thread qwcode
sorry to intrude, but the question has come up twice (with 2 different authors) on the list in the last few months with no replies. I'll try again on the user list with some different words --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: application scope objects? (maybe need cherrypy instead)

2009-06-23 Thread qwcode
2 examples of where you'd want this: 1) storing a compiled xslt template (which is thread safe) that will be used repeatedly 2) storing a pylucene IndexSearcher object (which is thread safe) which are expensive to recreate from searching the archive, this question is coming up a lot (usually

application scope objects?

2009-06-23 Thread qwcode
coming from the java/servlet world, objects can be placed in the "ServletContext", thereby making their scope *application* level, not per request. Yes, you have to be conscious of thread safety in putting an object there, but atleast you have this option. There's something similar for .Net ap