Konloch Software

Task Manager

Published 02/20/2023 Updated 09/12/2023

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

What Does It Do?

  • Small Java Library that provides task execution / queueing,
    • Used to delay code / run a function in the ‘background’ without delaying the main thread.
  • FIFO, by design it queues tasks onto a single thread.

Links

Requirements

  • Java 8 or greater

How To Integrate as a Dependency

Add the following to your pom.xml as a maven dependency, or just download the latest release and import it with your IDE.

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

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");
});

Latest Updates

Task Manager v1.0.1

This is the second public release of the library, it has been heavily tested but please feel free to report any issues found.

To add it as a…

Read More

Task Manager v1.0.0

This is the first public release of the library, it has been heavily tested but please feel free to report any issues found.

To add it as a…

Read More