jeepinjeff 4 Posted February 28, 2016 Report Share Posted February 28, 2016 ...how to properly use threads? I ran a bot the day before yesterday based upon GoGetta's proxy script. I had to modify it a bit since I don't have the HTTP plugin but it seemed to operate just as it would have WITH the HTTP calls in it. I compiled and ran it with just 50 threads...and it froze...dead... 50 threads isn't very many, so I'm thinking that I may have done something wrong. Add to that the confusion about threads when you do a search here in the forum - The work, they don't, use a container, don't use a container.... Here's the snippet from the script that I used to thread everything: set(#threads_track,0,"Global") thread spawn($list total(%list),#Threads) { increment(#threads_track) main($next list item(%row_count), $next list item(%list)) decrement(#threads_track) decrement(#Queued) } In MAIN, I opened a new invisible browser and scraped content. Thanks all! Jeff Quote Link to post Share on other sites
pash 504 Posted February 29, 2016 Report Share Posted February 29, 2016 From a user experience "thread spawn".Not suitable for use with a lot of thread.And the multi-step procedures.Try switching to a simple statement instead of "thread spawn". Quote Link to post Share on other sites
jason 101 Posted March 1, 2016 Report Share Posted March 1, 2016 ...how to properly use threads? I ran a bot the day before yesterday based upon GoGetta's proxy script. I had to modify it a bit since I don't have the HTTP plugin but it seemed to operate just as it would have WITH the HTTP calls in it. I compiled and ran it with just 50 threads...and it froze...dead... 50 threads isn't very many, so I'm thinking that I may have done something wrong. Add to that the confusion about threads when you do a search here in the forum - The work, they don't, use a container, don't use a container.... Here's the snippet from the script that I used to thread everything: set(#threads_track,0,"Global") thread spawn($list total(%list),#Threads) { increment(#threads_track) main($next list item(%row_count), $next list item(%list)) decrement(#threads_track) decrement(#Queued) } In MAIN, I opened a new invisible browser and scraped content. Thanks all! Jeff It looks like there's quite a bit more to this script. If it's freezing after ~50, could you open a support ticket with more information so we can see if there's something wrong with 1) the page you're using, 2) the rest of the script, or 3) something on ubot's end? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted March 2, 2016 Report Share Posted March 2, 2016 50 threads with and without the HTTP Post plugin are two completely different things. With HTTP Post most computers probably could open that no problem but without it many computer probably could not. HTTP Post isn't using the browser so you can't really try to make the program do the same things. I suggest trying 5 or 10 threads if you are not using HTTP Post. Also, as Pash said you may not want to use Thread Spawn. Instead try to create the code based on TJ's example here: http://network.ubotstudio.com/forum/index.php/topic/10042-new-v4-tutorial-multi-threading-example/ 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.