ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!

Jump to content



Photo

How can I code multithreaded checker?


  • Please log in to reply
How can I code multithreaded checker?

#1

sardine
sardine
    Offline

    selly.gg/u/biometric

  • Posts: 44
  • Joined: Jan 13, 2019
  • Reputation: 0
  • Likes: 8
  • Credits: 0
  • Leecher level:-38 38
#1
Hi, I'm coding a checker in Java, actually it works perfectly in 1 thread but when I try to do it multithreaded (I tried using ExecutorService) it do shit (put valid account as invalid, skips combos or hits, skip proxies, etc..)

Do you have a working code example?
Thanks

  • 0

Account & Config Seller (Brioche Dorée - KFC FR - BeIn Sport - RMC Sport)

https://selly.gg/u/biometric/groups


#2

willywillywoo
willywillywoo
    Offline

    Member

  • Posts: 57
  • Joined: Apr 04, 2018
  • Reputation: 2
  • Likes: 6
  • Credits: 0
  • Leecher level:-9 9

Half year registered
#2

Been a while, but last time I did it, I did a threadable, threw everything in there, and made instances of it and pass information to them to process. One problem that yours may have is that iirc asynchronous does not wait for a call to finish before running more code.(Someone should double check this though) Some source code would be nice too...


  • 1

#3

tonu96
tonu96
    Offline

    New Member

  • Posts: 15
  • Joined: Mar 12, 2019
  • Reputation: 0
  • Likes: 2
  • Credits: 0
  • Leecher level:-5 5
#3

Hi, I'm coding a checker in Java, actually it works perfectly in 1 thread but when I try to do it multithreaded (I tried using ExecutorService) it do shit (put valid account as invalid, skips combos or hits, skip proxies, etc..)

Do you have a working code example?
Thanks

ExecutorService is definitely the way to go for multithreading since you can set the number of threads and queue size and Java will take care of the rest. You just need to implement the Runnable that will do the actual checking. I'm assuming your problem may have stemmed from supplying the workload to the threads without a thread-safe data structure. If this is the case have a look at the data structures in java.util.concurrent for some alternatives, specifically the LinkedBlockingQueue for supplying the values to your worker threads. These data structures will help ensure that multiple threads don't try to read the same value, which will cause issues and sometimes exceptions.


  • 0

#4

flies
flies
    Offline

    New Member

  • Posts: 23
  • Joined: Mar 13, 2019
  • Reputation: 0
  • Likes: 0
  • Credits: 0
  • Leecher level:-4 4
#4

I will contact with you bud


  • 0

Discord - flies#2615



 Users browsing this thread: