Threading, Queue for a function so it only runs once at a time.

John P. mailinglists at riddergarn.dk
Fri Mar 12 12:25:13 EST 2010


On Fri, 12 Mar 2010 16:49:04 +0000, "John P." <mailinglists at riddergarn.dk>
wrote:
> On Fri, 12 Mar 2010 11:22:04 -0500, "D'Arcy J.M. Cain" <darcy at druid.net>
> wrote:
>> On Fri, 12 Mar 2010 15:56:12 +0000
>> "John P." <mailinglists at riddergarn.dk> wrote:
>>> Sorry but its not really an option for me with PostgreSQL. Thanks
> anyway.
>> 
>> Why?  It's your best option.  Any other solutions that you can't use
>> before people give you more suggestions?
> 
> Chill. I didn't ask for an alternative to my database, it could be
writing
> in a file as well. What I need is some kind of queue to my function so
it
> doesnt crack up running 20 times at the same time. I'm working on a
remote
> server which I share with some friends, meaning I can't install whatever
I
> want to. 
> The problem seems to be that my threads are making MySQL queries at the
> same time before it can fetch the data just requested. Also I said
thanks
> for his effort trying to help and kept a nice tone, shouldn't that be
> enough? 
> 
> /John

Don't worry guys, I found a solution. My problem was caused because I used
the same mysql connection for all the treads, now its working perfectly,
with mysql. 

/John.



More information about the Python-list mailing list