Closed vemacs closed 9 years ago
I assume I should do the same with all Threads I create?
Yep. You could create your own thread pool, but there's really no point in doing that when Bukkit already provides one.
Should (finally) be fixed in dev build 129.
I replaced almost all Threads with equivalent BukkitRunnables except for those on which I need actual Thread methods as Bukkit doesn't seem to provide a .join()
functionality.
You should be using the Bukkit Scheduler, which has a CachedThreadPool. Instanciating new non-pooled threads can result in a fairly big performance hit. Just runTaskAsync on a BukkitRunnable.