Jump to content
UBot Underground

Could Somebody Please Explain To Me...


Recommended Posts

...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

 

Link to post
Share on other sites

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".

Link to post
Share on other sites

...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? 

Link to post
Share on other sites

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/

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...