Hi everyone,
My bot is fully functional. It does a number of things in a loop and sleeps between each item in the loop, then at the end of the loop. Yet, my bot is single-threaded. If it is desirable that some of these items occur more frequently than others, then it seems appropriate to break the task up into multiple threads. Yet, there are a few problems:
- Editing Wikipedia requires a login, edit token, and cookies, which must be shared among the threads if multiple threads are able to edit. - If the threads do not coordinate their accesses to Wikipedia, the bot may communicate with Wikipedia in bursts, which does not play nicely. - One can get logged out at any time, requiring that the thread login again. - The fragile nature of the Internet means that all kinds of spurious errors are bound to occur.
Does anyone have any ideas about how to implement multithreading in a Wikipedia bot in a robust way?
Richard