crazyquids 3 Posted October 25, 2017 Report Share Posted October 25, 2017 Hi peeps , i'm trying to change proxies using a vpn and i want to do it when the last thread in Exbrowser has finished doing it's job.Tried doing it by incrementing a variable inside the loop and when the variable reaches a number start the vpn process.The problem is when the process starts threads are still doing actions.How can i wait for threads to finish and then start the vpn process ? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 25, 2017 Report Share Posted October 25, 2017 When you use threads you should have a decrement at the end of the thread, and so you can wait until that variable hits 0 before starting the vpn process using a loop while that number is greater than 0 and waiting in the loop while. I explain all about that and more here, you can skip to 18:50 in for just the multithreading part if you want to but watching from the beginning will help with knowing whats going on in the code: 1 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.