Git Product home page Git Product logo

p31taskmanager's Introduction

P31TaskManager for Unity

This is a lightweight task manager that lets you run a task either on the main thread (like a coroutine) or on a background thread. The general idea is for simple tasks you can use the built in P31ActionTask which will tick any Func (function that returns a boolean) you pass in each frame until you return false indicating the task is complete. For more complex tasks you can subclass P31AbstractTask for main thread tasks and P31AbstractBackgroundTask for background tasks. All non-background tasks can be paused, unpaused or cancelled (background tasks cannot be paused).

A task is defined as anything that requires work. It could be as simple as a method that needs to be called each frame (similar to Update but with the ability to pause/unpause/cancel) or as complex as something that needs to run on a background thread.

Tasks can also be chained. Each task has a nextTask property that you can set with any other task. This allows you to perform a series of work with each step needing the result of the previous task or to simply sequence any tasks.

p31taskmanager's People

Contributors

prime31 avatar

Watchers

Jack avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.