Local thread variable (attempting to create a connection pool)

2012-12-14 Thread Rafael Almeida
Hello, I have a django application which needs to connect to some backend services. Problem is I don't want to create a new connection everytime, but to use a connection pool. One connection per thread would be fine, but I don't know how to use django in order to achive that. I'd like to perhap

Re: Local thread variable (attempting to create a connection pool)

2012-12-14 Thread Rafael Almeida
can do > something workable, but ugly, using module-level variables, but there are > known patterns for creating singletons > > Here's some starters: > > http://stackoverflow.com/questions/42558/python-and-the-singleton-pattern > > > > > On Friday, December