Konloch / TaskManager

TaskManager is an easy to use zero dependency task manager / task queue.

Home Page:https://konloch.com/TaskManager/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TaskManager

TaskManager is an easy to use zero dependency task manager / task queue.

FIFO, by design it queues tasks onto a single thread.

๐Ÿ’ก Requirements

  • Java Runtime 1.8 or higher

โš™๏ธ How To Add As Library

Add it as a maven dependency or just download the latest release.

<dependency>
  <groupId>com.konloch</groupId>
  <artifactId>TaskManager</artifactId>
  <version>1.0.1</version>
</dependency>

๐Ÿ“š Links

๐Ÿ’ป How To Use

For a more in-depth example of how to use the TaskManager, view this test file.

//create and start a new task manager
TaskManager manager = new TaskManager();
manager.start();

//run the code after a delay of 1 second
manager.delay(1000, (task)->{
	System.out.println("This will execute after a delay of 1 second");
});

//create a task that will run forever
manager.doForever((task)->
{
	//stop the task depending on some condition
	if(someCondition)
		task.stop();
	else
		System.out.println("This will execute until stopped");
});

About

TaskManager is an easy to use zero dependency task manager / task queue.

https://konloch.com/TaskManager/

License:MIT License


Languages

Language:Java 100.0%