aikar / TaskChain

TaskChain Control Flow framework. Helps facilitate running tasks on an application's "Main Thread" (such as a game), and tasks off the main (async).
https://taskchain.emc.gs
MIT License
203 stars 38 forks source link
bukkit chain-methods concurrent-programming flow-control game-development gamedev-library java java-library minecraft-plugin rxjava scheduler-library sponge task-scheduler

TaskChain - Current Release Version: 3.7.2

What is TaskChain?

TaskChain is a Java Control Flow framework designed for Game Developers.

TaskChain helps facilitate running tasks on an application's "Main Thread", and parallel tasks off the main (async to main).

You define a series of tasks (a Task Pipeline) in the order that they should execute, and the registration of each task defines whether it should run on the main thread or not.

TaskChain then executes your task pipe line, switching thread context where needed, passing the result from the previous task to the next.

Documentation / Getting Started

  1. Why you should use TaskChain
  2. Learning TaskChain Terminology
  3. Using TaskChains & Examples
  4. Shared Task Chains

Supported Game Platforms

Currently Supported

Planned

3rd Party

Want to add your own game?

If you wish to add support for your own game, see Implementing a new game

JavaDocs

JavaDocs can be found at http://taskchain.aikar.co

Changelog

Please see CHANGELOG

Why does it require Java 8+?

Get off your dinosaur and get on this rocket ship!

On a serious note, Lambdas provided a much cleaner API and easier implementations.

Dinosaurs have been dead for a long time, so get off it before you start to smell.

Download Java 8

Using Kotlin 1.1 for Bukkit Plugins?

If you are a developing Bukkit plugins in Kotlin, we actually do not recommend using TaskChain. @okkero has created a vastly better experience using Coroutines in Kotlin.

We recommend using his framework, Skedule, which requires Kotlin 1.1.

Coroutines are a beautiful way to create this kind of behavior, but sadly we are not able to do that kind of stuff in Java Syntax.

Note that Skedule is only for Bukkit plugins. If you are working in a different platform, TaskChain does still work for Kotlin.

Older Versions

License

TaskChain (c) Daniel Ennis (Aikar) 2014-2017.

TaskChain is licensed MIT. See LICENSE