Jump to content
UBot Underground

[HowTo]..run Thread safe Container


Recommended Posts

here a short and dirty explain how u use the Thread commands from Wiiliam Bogacz  TinyMCE Integration PlugIn. which is free and can be downloadet here
 

Temporare downloadlink

 

Thread safe container

is usable as replacement for the normal threadcontainer and can be used like the normal Ubot Threads

the difference between both is that Thread safe container is locked lists and tables as long it is in use

what means all your other threads has to wait until unlocking.

this is a very good methode to prevent conflicts.

 

it is near to the Lock-Methodes of Databases like Oracle or MySQL

 

System Wide Thread safe container

is a bit more complex because it use Mutex

here is an C# Example for those who near to C#

http://pastebin.com/U7AYW9xd

 

The Mutexmethode is namebased what means

give your System Wide Thread safe container a name

and all what u do under this name is locked  for the system

what means if u run bots paralell  and this bots use the same thread with the same procedure and Mutexname
then there have to wait untill  the locked "
System Wide Thread safe container" is giving free

 

So that brings u the possiblety to do many things under one name with the gurantee  no other processes will work with it as long it is locked

 

for me Thread safe container is a massiv tool and a complete replace for the standart thread container.
check it by u self  i'm sure u will LUV it

My thx for this awesome PlugIn goes to 
Wiiliam Bogacz and his Coder
Great JOB !

 

Hope u enjoy this little tut and
doing is learning soooo  DO IT !

 

 

 

 

 

  • Like 7
Link to post
Share on other sites
  • 4 weeks later...

Hi Blumi, Do you have a sample code on how to use these 2 commands? It seems so powerful but im not sure how to use it right now.. I tried to use it like the normal thread command but it didnt work. Im sure im doing something wrong..

 

Thanks in advance.

Link to post
Share on other sites

easy to understand
use your threads like u did before  inside this threads  use the thread save container  everytime u have to do things exclusive  like  save your threadlist to the masterlist and so on
instead to use  switches who tells the other threads  stop u cant and have to wait until im open again.
same with systemwide thread save container...

as example u got many bots running  working all with the same masterlist  with systemwide tsc every bot will wait untill  the one who fill in this masterlist is finnished...

 

for all the geeks here  works like a mysql Lock and unlock

 

hope that helps

Link to post
Share on other sites

10 bots collect  adresses
10 bots use the same sqlite or textfile
if one of that 10 bots write new stuff in this adressfile the other 9 have to wait

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

This is pretty awesome! How did this plugin slip by me, and where can I find out more information about this plugin?  I'm curious why its called Tinymce Integration and wondering how this works to use tinymce actually.

 

Thanks man, this is an awesome share!

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

here a short and dirty explain how u use the Thread commands from Wiiliam Bogacz  TinyMCE Integration PlugIn. which is free and can be downloadet here

 

Is there a link to this TinyMCE plugin you mentioned?

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

i just got a chance to try this today

 

runs 1000 threads but it seems like run only 1 thread because other threads have to wait

 

is this the correct work blumi?

Maybe you can try my plugin, I think it will work faster...

http://www.ubotstudio.com/forum/index.php?/topic/15441-free-plugin-threads-counter-ubot-v4-threading-fixed/

Link to post
Share on other sites

i just got a chance to try this today

 

runs 1000 threads but it seems like run only 1 thread because other threads have to wait

 

is this the correct work blumi?

Thread safe Container is made for GLOBAL Lists, Tables and other global Stuff

as example....

 

in your threads u will run your local lists and if the thread has made his job u can use Thread safe Container  to save your things from local stuff to global stuff

if your Global List,Table or what else is in this Container  no other thread can use it as long the used thread are finnished his job

is like LOCK and UNLOCK tables in MySQL

  • Like 1
Link to post
Share on other sites

Thread safe Container is made for GLOBAL Lists, Tables and other global Stuff

as example....

 

in your threads u will run your local lists and if the thread has made his job u can use Thread safe Container  to save your things from local stuff to global stuff

if your Global List,Table or what else is in this Container  no other thread can use it as long the used thread are finnished his job

is like LOCK and UNLOCK tables in MySQL

 

I understand the concept of LOCK and UNLOCK

 

for example if all these 1000 threads using the same global list then when the first thread processing the list then the other 999 threads has to wait that first thread to be finished

 

That is what i mean like running 1 thread instead of multithreading

Link to post
Share on other sites
  • 1 month later...
  • 2 months later...

with multithreading and lots of threads? Doesnt seem to be working. The thread loop count is much higher than the list position ( from next list item with thread safe container ) which means the thread safe container isnt working on the next listen item function otherwise the list position would be the same as the thread loop count

 

just did many different tests. it doesnt work... if you think it works, id like to see a multi-threaded example of yours with lists functions that are 'thread safe contained' working with up to 100 threads.

Link to post
Share on other sites

the Thread safe container has absolut nothing to do with the counts of list,

the only thing this does is if some thread go on a list or a file or a var, all others have to wait untill is done

is nothing else like a start transmision  and comit 

so there is absolut no reason why this should not work.

Link to post
Share on other sites

Yes i understand that, therefore if you have the thread safe container on a 'next list item' it should always wait for a thread to finish before it starts the next list item of the next. If you try it out, you'll see it only makes it worse and produces less results than without thread safe container. 

 

 

Please go to: http://www.ubotstudio.com/forum/index.php?/topic/15441-free-plugin-threads-counter-ubot-v4-threading-fixed/?p=95829

 

and try out that code. run it without a thread safe container. as you can see it still doesnt complete all 1k tasks because ubot cant handle 'add item to list' .... ' at the same time ' on multiple threads

Now add a thread safe container to that function, and you will see the results it produces are even LESS than without thread safe container. without i get about 50-60 total list items. with thread safe i get like 2.... 

Link to post
Share on other sites

ahh okay i see....
this is not a problem of the thread safe container 

i thing it has to do with ubot it self  if u use threads that many

what i saw, also Mem is an reason why things not work and even Windows 

did u try giv'm a "free ubot memory" in this TSC ?

try it maybe that helps

Link to post
Share on other sites

Yeah i tried with memory but i have plenty of memory i have 32 gigs ram and 320 gigs ssd drive with quad core processor. 

But doesnt it have to do with thread safe container? since it should contain the 'next list item' until the current thread finishes? 

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