1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Kill Threads on Disable

Discussion in 'Plugin Help' started by EnteMomo, Apr 30, 2020.

  1. EnteMomo

    EnteMomo Silverfish

    Messages:
    22
    GitHub:
    Joshiiiii
    Hello,
    does anybody know how I can kill a Thread on disable? Because I always have to wait 5 seconds at the end because it says: "<Server thread/Info> Stopping other threads"
    and then after some time there comes the message: "Took too long to stop, server was killed forcefully!"
    Thanks!
    ~Joshi
     
  2. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    If you have some running process on thread, you must wait until finish... Then the thread will be close normally.
     
    EnteMomo likes this.
  3. EnteMomo

    EnteMomo Silverfish

    Messages:
    22
    GitHub:
    Joshiiiii
    So is there any way I could force kill this thread and with it the process running on this thread?
     
  4. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    You can add condition to the thread, which will be able to break loop running on that thread.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.