All Projects → taskflow → Work Stealing Queue

taskflow / Work Stealing Queue

Licence: other
A fast work-stealing queue template in C++

Projects that are alternatives of or similar to Work Stealing Queue

Corium
Corium is a modern scripting language which combines simple, safe and efficient programming.
Stars: ✭ 18 (-85.48%)
Mutual labels:  parallel-computing, multithreading
b-rabbit
A thread safe library that aims to provide a simple API for interfacing with RabbitMQ. Built on top of rabbitpy, the library make it very easy to use the RabbitMQ message broker with just few lines of code. It implements all messaging pattern used by message brokers
Stars: ✭ 15 (-87.9%)
Mutual labels:  parallel-computing, multithreading
ParallelQSlim
Shape Aware Parallel Mesh Simplification Algorithm
Stars: ✭ 84 (-32.26%)
Mutual labels:  parallel-computing, multithreading
Openmp Examples
openmp examples
Stars: ✭ 64 (-48.39%)
Mutual labels:  multithreading, parallel-computing
Hamsters.js
100% Vanilla Javascript Multithreading & Parallel Execution Library
Stars: ✭ 517 (+316.94%)
Mutual labels:  multithreading, parallel-computing
parallel-dfs-dag
A parallel implementation of DFS for Directed Acyclic Graphs (https://research.nvidia.com/publication/parallel-depth-first-search-directed-acyclic-graphs)
Stars: ✭ 29 (-76.61%)
Mutual labels:  parallel-computing, multithreading
java-multithread
Códigos feitos para o curso de Multithreading com Java, no canal RinaldoDev do YouTube.
Stars: ✭ 24 (-80.65%)
Mutual labels:  parallel-computing, multithreading
CPURasterizer
CPU Based Rasterizer Engine
Stars: ✭ 99 (-20.16%)
Mutual labels:  parallel-computing, multithreading
Taskflow
A General-purpose Parallel and Heterogeneous Task Programming System
Stars: ✭ 6,128 (+4841.94%)
Mutual labels:  multithreading, parallel-computing
Pelagia
Automatic parallelization (lock-free multithreading thread) tool developed by Surparallel Open Source.Pelagia is embedded key value database that implements a small, fast, high-reliability on ANSI C.
Stars: ✭ 1,132 (+812.9%)
Mutual labels:  multithreading, parallel-computing
So 5 5
SObjectizer: it's all about in-process message dispatching!
Stars: ✭ 87 (-29.84%)
Mutual labels:  multithreading
Capture Thread
Lock-free framework for loggers, tracers, and mockers in multithreaded C++ programs.
Stars: ✭ 93 (-25%)
Mutual labels:  multithreading
Bilibili member crawler
B站用户爬虫 好耶~是爬虫
Stars: ✭ 115 (-7.26%)
Mutual labels:  multithreading
Reading
A list of computer-science readings I recommend
Stars: ✭ 1,919 (+1447.58%)
Mutual labels:  parallel-computing
Biglasso
biglasso: Extending Lasso Model Fitting to Big Data in R
Stars: ✭ 87 (-29.84%)
Mutual labels:  parallel-computing
Dns Discovery
DNS-Discovery is a multithreaded subdomain bruteforcer.
Stars: ✭ 114 (-8.06%)
Mutual labels:  multithreading
Lsh deeplearning
Scalable and Sustainable Deep Learning via Randomized Hashing
Stars: ✭ 85 (-31.45%)
Mutual labels:  parallel-computing
Go Concurrency
This repos has lots of Go concurrency, goroutine and channel usage and best practice examples
Stars: ✭ 84 (-32.26%)
Mutual labels:  multithreading
Ngx Papaparse
Papa Parse wrapper for Angular
Stars: ✭ 83 (-33.06%)
Mutual labels:  multithreading
Dtcraft
A High-performance Cluster Computing Engine
Stars: ✭ 122 (-1.61%)
Mutual labels:  parallel-computing

Work-Stealing Queue

A fast single-header work-stealing queue template written in modern C++17

How to Use

A work-stealing queue enables one thread (queue owner) to push/pop items into/from one end of the queue, and multiple threads (thieves) to steal items from the other end. The following example shows the basic use of wsq.hpp.

// work-stealing queue of integer numbers
WorkStealingQueue<int> queue;

// only one thread can push and pop items from one end
std::thread owner([&] () {
  for(int i=0; i<100000000; i=i+1) {
    queue.push(i);
  }
  while(!queue.empty()) {
    std::optional<int> item = queue.pop();
  }
});

// multiple threads can steal items from the other end
std::thread thief([&] () {
  while(!queue.empty()) {
    std::optional<int> item = queue.steal();
  }
});

owner.join();
thief.join();

The library is a single header file. Simply compile your source with include path to wsq.hpp.

Compile Examples and Unittests

We use cmake to manage the package. We recommand using out-of-source build:

~$ mkdir build
~$ cd build
~$ make & make test

Technical Details

This library implements the work-stealing queue algorithm described in the paper, "Correct and Efficient Work-Stealing for Weak Memory Models," published by Nhat Minh Lê, Antoniu Pop, Albert Cohen, and Francesco Zappa Nardelli at 2013 ACM Principles and Practice of Parallel Programming (PPoPP).

Robustness

This library is part of the Cpp-Taskflow project. It has experienced thousands of tests in both micro-benchmarks and large-scale real-world parallel applications.

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].