getTaskQueue

abstract ThreadExecutor getTaskQueue()

Get the task queue for a given side.

As Minecraft networking I/O is asynchronous, but a lot of its logic isnot thread-safe, it is recommended to do the following:

  • read and parse the PacketByteBuf,
  • run the packet response logic through the main thread task queue viaThreadTaskQueue.execute(). The method will check if it's not alreadyon the main thread in order to avoid unnecessary delays, so don'tworry about that!

Return

The thread task queue.

Sources

jvm source
Link copied to clipboard