Bot-Factory 602 Posted December 12, 2014 Report Share Posted December 12, 2014 Okay i changed it to use the thread counter read instead of by variable and its still miscounting. I changed my thread code to be exactly like your example as well with the only difference being my define command. the thread counts are all outside of my define so nothing within the define code should be messing up the thread counter....Please share the code where we can reproduce that problem. Then we are able to help you. Kindest regardsDan Quote Link to post Share on other sites
earthlingj 13 Posted December 17, 2014 Report Share Posted December 17, 2014 i removed threadcounter reset in the beginning of my loop and now it works much better, but still goes off sometimes. i have another bot i run 50 threads on and that one is always off. Quote Link to post Share on other sites
earthlingj 13 Posted December 19, 2014 Report Share Posted December 19, 2014 http://i.imgur.com/yZJckir.png its not thread safe. Quote Link to post Share on other sites
Bot-Factory 602 Posted December 19, 2014 Report Share Posted December 19, 2014 http://i.imgur.com/yZJckir.png its not thread safe. The plugin works fine. Your code might be the problem.But as mentioned a couple of times, without showing us your code, we can't help you.Give us some Ubot code that allows us to reproduce the error please. Without code, there is nothing we can discuss. Dan Quote Link to post Share on other sites
earthlingj 13 Posted December 25, 2014 Report Share Posted December 25, 2014 im using the exact same code in the demo here. the problem is the DECREMENTING thread count. it really doesnt seem to be thread safe. I dont want to share my full source for obvious reasons, but what i can say is.. im 100% using the exact demo in this thread and im not new to ubot ive been doing this a long time. unless defines sometimes randomly get skipped, there is no reason for the thread count to be off other than it not being thread safe and decrementing ' at the same time' which is throwing off the count. Quote Link to post Share on other sites
UBotDev 276 Posted December 26, 2014 Author Report Share Posted December 26, 2014 No one else except you is having this problem or is being able to reproduce it. While you can't share your code we also can't help you "because of the obvious reasons". You've been doing UBot for long time.....but you made the most basic mistake with threading, while you didn't use a define command around thread. With such a basic mistake I think you still have some problems understanding threading in UBot, that's why I think the problem is actually in your code and not with the plugin; If you would read the post about how threads counter does it's job and understand the C# code behind, you would know that it is indeed thread safe...I guess there could be a small chance that UBot would make in unsafe (via their plugin API), but I doubt that's the case (again, never had problems with the plugin). P.S.: To solve this....maybe try your code in Ubot v5, where you don't need threads counter anymore, since threading seems to be fixed there (although I've decided to still use threads counter in v5 until it becomes more stable, so I can revert to v4 any time). Quote Link to post Share on other sites
acamso 55 Posted January 29, 2015 Report Share Posted January 29, 2015 UbotDev, as discussed in PM, I was wondering if it were possible to have multiple counters. I use the thread counter mainly for list positions as it increments and sets the list position in one shot to avoid conflicts. However, I'd like to run multiple tasks at one time that both use the threads counter, so it would be great if it were possible to have multiple counters. Thanks 1 Quote Link to post Share on other sites
acamso 55 Posted April 7, 2015 Report Share Posted April 7, 2015 Hey.. I will pay you extra for multiple counters. Please let me know Quote Link to post Share on other sites
johnwalton 12 Posted September 17, 2018 Report Share Posted September 17, 2018 Hey botters, does anyone have this Threads Counter handy? i'm not able to get it from the website. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted September 17, 2018 Report Share Posted September 17, 2018 Hey botters, does anyone have this Threads Counter handy? i'm not able to get it from the website. You don't need it for V5 just so you know. Quote Link to post Share on other sites
johnwalton 12 Posted September 17, 2018 Report Share Posted September 17, 2018 Ah thanks. 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.