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

John P. mailinglists at riddergarn.dk
Fri Mar 12 02:11:20 EST 2010


Hi, 

Im programming a simple webcrawler with threading for the fun of it, which
is inserting the data fetch into a mysql database, but after continuously
cause my mysql server to produce error during database queries (i assume
its cause because of the many execution at the same time.) the scipt
produces errors.

I figured out i need some kind of queue for the function i use to insert
into the database, to make sure its only called once at a time.

I have looked at the Queue module but its for more complicated than my
current python skills can cope with. :)

Would somebody please help me out here?

Thanks.

--
John P.



More information about the Python-list mailing list