itexspert 47 Posted February 13, 2015 Report Share Posted February 13, 2015 So i am wondering imagine this scenario: I am scraping data from 3 different sites into a same table every site is on its own thread Now when you save data i usually use variable to increment row position what i want to know is what logic do you guys use to save data into the same table when multithreading there can be issues like: What if the data is re-written by other variable from other Thread? i mean what if data from site 1 is in the table and then it gets re-written over by data from site 2?? I am just exploring possibilities here to learn what is the best way! Any help is appreciated! Quote Link to post Share on other sites
dyvel 20 Posted February 13, 2015 Report Share Posted February 13, 2015 Take a look at "append to file" - I think it will suit you needs... http://wiki.ubotstudio.com/wiki/Append_to_File EDIT: You'll also find this helpful: http://www.ubotstudio.com/forum/index.php?/topic/14205-howtorun-thread-safe-container/ Quote Link to post Share on other sites
diskwizz 24 Posted February 13, 2015 Report Share Posted February 13, 2015 This is all you need to check to solve your issues Howto Make A Bot Thread Safe When Multithreading Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.