Jump to content
UBot Underground

Tables And Lists In A Thread Local Or Global?


Recommended Posts

If I create a table or list in a thread, is that local to that thread or global?

I have a multi threaded bot that scrapes a page and stores stuff in a temp list to compare it to a known value I'm looking for.

The issue is I think the temp table is being overwritten by the other threads so the compare fails because its now being compared to some other threads expected outcome.

IF its global and not local, how can I get around that?

I don't see how I can generate a random table/list name and know what to use later?

Edited by Denethor
Link to post
Share on other sites

Hi Denethor,

 

Pash is correct.  However, you can use List and construct each list item as a CSV Row of data.

 

Then at some point in your main bot you can reload the entire List as a Table.

 

I hope that helps you.

 

Buddy

Link to post
Share on other sites
  • 2 weeks later...

Hi Denethor,

 

Pash is correct.  However, you can use List and construct each list item as a CSV Row of data.

 

Then at some point in your main bot you can reload the entire List as a Table.

 

I hope that helps you.

 

Buddy

So lists are local and tables are global?

Link to post
Share on other sites

So lists are local and tables are global?

 

Lists can be local if you set them to be under the advanced options (change the list scope there).

 

By default lists are global.

 

Tables are always global.

 

When you work with a local list or variable they are local to the custom command/function - NOT to the thread.

 

I hope this clears it up for you if you have any questions let me know!

  • Like 1
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...