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

J

John P.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top