Skip navigation links

Package net.glowstone.scheduler

This package contains the core of Glowstone's threading model.

See: Description

Package net.glowstone.scheduler Description

This package contains the core of Glowstone's threading model.

Glowstone has 4 groups of threads:

Whenever a thread wishes to call an event or perform other interactions with Bukkit API, it calls the GlowScheduler.syncIfNeeded( java.util.concurrent.Callable).

The scheduler thread synchronizes the world threads, so that each world thread begins a tick at the beginning of a scheduler pulse.

Operation order:

  1. Scheduler tick begins
  2. Pulse sessions
  3. run sync tasks, queue async tasks
  4. World tick for each world
  5. Run in-tick tasks
  6. await all worlds complete (in async task)
Skip navigation links

Copyright © 2021. All rights reserved.