All Projects → Tastyep → TaskManager

Tastyep / TaskManager

Licence: MIT license
A C++14 Task Manager / Scheduler

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to TaskManager

bikeshed
Lock free hierarchical work scheduler
Stars: ✭ 78 (-3.7%)
Mutual labels:  multithreading, task-manager, task-scheduler
Rqueue
Rqueue aka Redis Queue [Task Queue, Message Broker] for Spring framework
Stars: ✭ 76 (-6.17%)
Mutual labels:  workers, task-manager, task-scheduler
Transmittable Thread Local
📌 TransmittableThreadLocal (TTL), the missing Java™ std lib(simple & 0-dependency) for framework/middleware, provide an enhanced InheritableThreadLocal that transmits values between threads even using thread pooling components.
Stars: ✭ 4,678 (+5675.31%)
Mutual labels:  asynchronous, thread-pool
Flower
Real-time monitor and web admin for Celery distributed task queue
Stars: ✭ 5,036 (+6117.28%)
Mutual labels:  asynchronous, workers
mvThreadPool
An easy to use C++ Thread Pool
Stars: ✭ 30 (-62.96%)
Mutual labels:  multithreading, thread-pool
celery.node
Celery task queue client/worker for nodejs
Stars: ✭ 164 (+102.47%)
Mutual labels:  workers, task-manager
Ngx Papaparse
Papa Parse wrapper for Angular
Stars: ✭ 83 (+2.47%)
Mutual labels:  workers, multithreading
Threadly
A library of tools to assist with safe concurrent java development. Providing unique priority based thread pools, and ways to distrbute threaded work safely.
Stars: ✭ 196 (+141.98%)
Mutual labels:  asynchronous, thread-pool
Threads.js
🧵 Make web workers & worker threads as simple as a function call.
Stars: ✭ 1,328 (+1539.51%)
Mutual labels:  multithreading, thread-pool
noroutine
Goroutine analogue for Node.js, spreads I/O-bound routine calls to utilize thread pool (worker_threads) using balancer with event loop utilization. 🌱
Stars: ✭ 86 (+6.17%)
Mutual labels:  workers, multithreading
ParallelQSlim
Shape Aware Parallel Mesh Simplification Algorithm
Stars: ✭ 84 (+3.7%)
Mutual labels:  multithreading, thread-pool
thread-pool
BS::thread_pool: a fast, lightweight, and easy-to-use C++17 thread pool library
Stars: ✭ 1,043 (+1187.65%)
Mutual labels:  multithreading, thread-pool
Px sched
Single Header C++11 Task Scheduler
Stars: ✭ 182 (+124.69%)
Mutual labels:  multithreading, task-scheduler
rails async migrations
Asynchronous support for ActiveRecord::Migration
Stars: ✭ 56 (-30.86%)
Mutual labels:  asynchronous, workers
Java Concurrency Examples
Java Concurrency/Multithreading Tutorial with Examples for Dummies
Stars: ✭ 173 (+113.58%)
Mutual labels:  multithreading, thread-pool
Swiftcoroutine
Swift coroutines for iOS, macOS and Linux.
Stars: ✭ 690 (+751.85%)
Mutual labels:  asynchronous, multithreading
theeye-of-sauron
TheEye Dockers and QuickStart
Stars: ✭ 27 (-66.67%)
Mutual labels:  workers, task-scheduler
Hamsters.js
100% Vanilla Javascript Multithreading & Parallel Execution Library
Stars: ✭ 517 (+538.27%)
Mutual labels:  multithreading, thread-pool
Fibertaskinglib
A library for enabling task-based multi-threading. It allows execution of task graphs with arbitrary dependencies.
Stars: ✭ 679 (+738.27%)
Mutual labels:  multithreading, task-scheduler
torequests
Async wrapper for requests / aiohttp, and some crawler toolkits. Let synchronization code enjoy the performance of asynchronous programming.
Stars: ✭ 22 (-72.84%)
Mutual labels:  asynchronous, thread-pool

alt text

Build Status

TaskManager is an asynchronous task management library using the features of C++14.

Requirements

A compiler supporting the C++14 features.

Features

Components
  • A ThreadPool, manages workers (threads).
  • A Task manager for running tasks asynchronously.
  • A Scheduler for scheduling tasks asynchronously.
Interface
  • The library exposes a module with free functions for creating managers and schedulers.

Documentation

Online documentation can be found here.

The documentation is generated using Doxygen which means it can also be found in the source code.

Note: Files located in the detail/ directories are left undocumented as they are not exposed and only used internally.

Basic Usage

Manager

Note: The following examples use chrono literals.

// Create the thread pool with the initial number of threads (2 here).
Task::Module::init(2);

// Create a task manager with one worker.
auto manager = Task::Module::makeManager(1);

// Add a new task and get its future.
auto future = manager.push([] { return 42; });

// Get the result from the future and print it.
std::cout << future.get() << std::endl; // Prints 42

// Not necessary here, but the stop method ensures that all launched tasks have been executed.
manager.stop().get();

In the above example if we were to push more tasks, only one at a time would be executed as the manager has only one worker assigned.

Scheduler
// Create the thread pool with the initial number of threads (2 here).
Task::Module::init(2);

// Create a scheduler with one worker.
auto scheduler = Task::Module::makeScheduler(1);

// Declare the variable n.
size_t n = 0;

// Add new tasks and get the future.
auto future = scheduler.scheduleIn("Task1", 2s, [&n] { n++; });
scheduler.scheduleIn("Task2", 1s, [&n] { n = 41 });

// Get the future and print the updated value.
future.get()
std::cout << n << std::endl; // Prints 42

// Not necessary here, but the stop method ensures that all the scheduled tasks have been executed.
scheduler.stop().get();

The same note applies for the scheduler regarding the number of associated workers. Also an identifier ("TaskX") is provided so that periodic tasks could be removed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].