Interface RegionizedScheduler
public interface RegionizedScheduler
Schedules tasks to run on the region thread that owns a given world position.
The server world is split into independently-ticked regions, each owned by a single worker
thread. Tasks submitted through this scheduler run on whichever thread currently owns the
targeted (worldName, pos), rather than on the calling thread.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidSchedulestaskto run as soon as possible on the region thread owningpos.voidexecuteDelayed(Key worldName, ChunkPos pos, Runnable task, long delayTicks) Schedulestaskto run on the region thread owningpos, after at leastdelayTicksserver ticks have elapsed.booleanisOwnedByCurrentThread(Key worldName, ChunkPos pos) Takes a snapshot of the current per-region tick performance.
-
Method Details
-
execute
-
executeDelayed
Schedulestaskto run on the region thread owningpos, after at leastdelayTicksserver ticks have elapsed.- Parameters:
worldName- the key of the world the position belongs topos- the chunk position identifying the target regiontask- the task to rundelayTicks- the minimum number of ticks to wait before running the task- Since:
- 0.1.0
-
isOwnedByCurrentThread
-
tpsSnapshots
-