(Dis-)Advantages of Sync-/Async-Repeating-Tasks

Discussion in 'Plugin Development' started by Schwarzer Zylinder, Dec 30, 2011.

Thread Status:
Not open for further replies.
  1. Hi,
    my plugin needs to check and change the balance of players every 20 seconds or so (configurable). For now I used a SyncRepeatingTask.
    Where are the advantages and disadvantages from Synced and Async Tasks?

    Thanks!
     
  2. http://wiki.bukkit.org/Scheduler_Programming
    Basically: as soon as you are using bukkit API methods, async tasks are a no-go.
    Async's only advantage is when you are doing tasks that take lots of time (SQL queries, complicated calculations), but NEVER access anything bukkit related from them.
     
Thread Status:
Not open for further replies.

Share This Page