Jump to content
UBot Underground

Threads and Global Lists


Recommended Posts

Hello,

Just asking if the "next lilst item" command is safe to use inside a thread, for a global list.

For example we have a global orders list, and a thread is logged to an account, same or diferent.

 

In that thread call to the "next list item" in the global list, will be this a safe call?

Ubot manages itself the access to variables from threads? I dont have to worry about concurrence and other normal threading stuff?

 

Thanks.

 

Link to post
Share on other sites

I have not had any issues with it.

 

But others say it is best to use

 

set(#list pos, 0, "Global")
loop($list total(%my list)) {
    set list position(%my list#list pos)
    comment("code here")
    increment(#list pos)
}

 

 

That way might give more security but next list item will get the job done too.

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