Forget previous post. Wikipedia made me smarter ;-)
I'd now just name it a scheduling problem: how will the main thread decide which tasks to perform in which order, and how long to sleep between.
From simple to elegant (and from hacky to easily expandable/reframeable):
• You might hard-code it, as you already proposed, • you might create a job list (including sleep-times) statically and let the bot loop through it, • or you might code a scheduling mechanism that creates the job list/job order dynamically.
-- Johannes Ponader 0162/94 64 94 0
Am 22.03.2011 um 15:06 schrieb richardcavell@mail.com:
Virtualize it. Give every thread a scheduling mechanism. When
activated, let any thread do nothing but writing his job > into a queue. Let a master thread work himself through the queue.
Yeah, I think that's the way to do it. You have to have at least one thread, and that thread becomes the 'main' thread, which carries the cookies, the edit token and the right to edit Wikipedia. Its Wikipedia access rate can be throttled as necessary. Any other threads are just sensory, and pass their data to a job queue for the main thread.
Richard
Wikibots-l mailing list Wikibots-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibots-l