Skip to content
FigT edited this page Nov 10, 2022 · 4 revisions

Mesh Wiki

About Mesh

Mesh is a library that allows you to 'mesh' together a series of tasks, whilst switching thread contexts. It closely resembles the CompletableFuture class, except with the ability to switch between sync (main server thread) and async thread contexts, add delays between tasks, and it's bound to the BukkitScheduler.

More plainly put, it's an abstraction of the CompletableFuture class/workflow for Spigot/Bukkit.

This library was partly inspired by the 'Promise' API in Lucko's Helper and Aikar's TaskChain library.


FAQ

  • Why not just use the CompletableFuture class? The CompletableFuture class isn't bound to Bukkit or Minecraft's main thread, so it's rather weird when it comes to performing synchronous tasks, the sync versions of the methods are still done asynchronously (not on the main MC server thread).

    Mesh fixes this issue as it's all bound to the BukkitScheduler under the hood, plus, I've tried to make it a (somewhat) seamless transition from using the CompletableFuture class.
  • Why use this over TaskChain or the BukkitScheduler?The BukkitScheduler is quite messy and weird when switching thread contexts, and such.

    TaskChain is a designed as a task management pipeline, whereas Mesh is really an abstraction of the CompletableFuture class/workflow for Spigot
  • Why is it called Mesh?It sounds cool and represents what this library does.
  • Where do I get support?You can create an issue on the GitHub page, and my Discord DMS are open (if you need to contact me quickly).
  • Can I use Mesh in a commercial projectTLDR; Yes, Mesh is licensed under the MIT license. I would recommend reading the full license for more information.

Have other questions? Create an issue on GitHub or DM me on Discord.

Clone this wiki locally