Thread Safety

Discussion in 'Plugin Development' started by Chris Covert, Feb 11, 2011.

  1. Offline

    Lologarithm

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This is exactly what I was going to recommend.
  2. Offline

    matejdro

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    So i should do like i do now, except that instead of code running in my own thread, just start scheduler from that thread?
  3. Offline

    Lologarithm

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Start a new thread, have it sleep for the amount of time you want, and then wake up and execute the function you want when it wakes up. (probably have it run a 0 delay sync task in the main thread.)

Share This Page