When using the scheduler ..

Discussion in 'Plugin Development' started by Joshua Burt, Aug 30, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Joshua Burt

    Since synchronous tasks are executed by the main server thread, is it safe to use the bukkit API in them?
    What happens if you have more than a single synchronous task?

    Is there the ability to mark a piece of code as a mutex?
     
  2. Offline

    Arkel

    http://wiki.bukkit.org/Scheduler_Programming
    tl;dr - Yes, synchronous tasks can be used to call API methods, apart from anything that pauses/blocks it i.e. network read tasks. As far as I know, you can have many synchronous tasks, the tasks will just yield to each other and get exectuted in whatever order, and I'm not sure about mutual expressions.
     
  3. Offline

    Joshua Burt

    Awesome, thank you!
     
Thread Status:
Not open for further replies.

Share This Page