pthread_pool - A simple implementation of thread pooling for C/C++ using POSIX threads

  •        3

A simple implementation of thread pooling for C/C++ using POSIX threads. Each pool has a designated worker function, and expects to be given a number of work items. Any thread in the pool can take a work item, and will pass the work item to the pool's worker function. The work items are void *, and are passed to the worker function exactly as they are given to pool_enqueue. The return values of the worker functions are ignored.

https://github.com/jonhoo/pthread_pool

Tags
Implementation
License
Platform

   




Related Projects

FiberTaskingLib - A library for enabling task-based multi-threading

  •    C++

This is a library for enabling task-based multi-threading. It allows execution of task graphs with arbitrary dependencies. Dependencies are represented as atomic counters. Under the covers, the task graph is executed using fibers, which in turn, are run on a pool of worker threads (one thread per CPU core). This allows the scheduler to wait on dependencies without task chaining or context switches.

Smart Thread Pool

  •    DotNet

Smart Thread Pool is a thread pool written in C#. It is far more advanced than the .NET built-in thread pool. Here is a list of the thread pool features: * The number of threads dynamically changes according to the workload on the threads in the pool. * Work items can...

pthreads - Threading for PHP

  •    PHP

This project provides multi-threading that is compatible with PHP based on Posix Threads. It can execute any and all predefined and user declared methods and functions asynchronously. It has built-in support of Synchronization, Synchronized Methods.

worker-threads-pool - Easily manage a pool of Node.js Worker Threads

  •    Javascript

Easily manage a pool of Node.js Worker Threads. Number of active workers in the pool.


PiThreads

  •    C++

PI-Threads; A C++ threads object built upon Win32 Threads and POSIX pthreads which can be compiled on either Win32 compliant systems or POSIX compliant systems with pthread support.

Odyssey - Scalable PostgreSQL connection pooler

  •    C

Advanced multi-threaded PostgreSQL connection pooler and request router. Odyssey can significantly scale processing performance by specifying a number of additional worker threads. Each worker thread is responsible for authentication and proxying client-to-server and server-to-client requests. All worker threads are sharing global server connection pools. Multi-threaded design plays important role in SSL/TLS performance.

threadpool - A simple C Thread pool implementation

  •    C

A simple C Thread pool implementation

threads.js - Easy to use, yet powerful multi-threading library for node.js and the browser.

  •    Javascript

Javascript thread library. Uses web workers when run in browsers and child processes when run by node.js. Also supports browsers which do not support web workers.You don't have to write the thread's code inline. The file is expected to be a commonjs module (so something that uses module.exports = ...), for node and browser.

thread-pool-cpp - High performance C++11 thread pool

  •    C++

Example run: Post job to thread pool is much faster than for boost::asio based thread pool. See benchmark/benchmark.cpp for benchmark code.

puma - A Ruby/Rack web server built for concurrency

  •    Ruby

Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications in development and production. Under the hood, Puma processes requests using a C-optimized Ragel extension (inherited from Mongrel) that provides fast, accurate HTTP 1.1 protocol parsing in a portable way. Puma then serves the request in a thread from an internal thread pool. Since each request is served in a separate thread, truly concurrent Ruby implementations (JRuby, Rubinius) will use all available CPU cores.

learnrxjava - A set of exercises to designed to teach developers Rx (Reactive Streams)

  •    Java

A sequential program runs on a flat timeline. Each task is only started after the previous one completes. In concurrent programs, multiple tasks may be running during the same time period and a new task may begin at any time. In threaded programs, introducing concurrency trades space for time. Allocating memory for more threads allows application servers to make network requests concurrently instead of sequentially. Threaded network requests can dramatically reduce server response times, but like all trade-offs this approach has its limits. Unchecked thread creation can cause a server to run out of memory or to spend too much time to context switching. Thread pools can help manage these problems, but under heavy load the number of threads in an application server’s pool will eventually be exhausted. When this happens network requests will be serialized, causing response times to rise. At this point the only way to bring down response times again is to scale up more servers, which increases costs.

Libzdb - Connection Pool Library in C

  •    C

Libzdb is a small, fast and easy to use Database Connection Pool Library. It is thread safe and connects to database like MySQL, PostgreSQL, SQLLite and Oracle.

pool - Connection pool for Go's net.Conn interface

  •    Go

Pool is a thread safe connection pool for net.Conn interface. It can be used to manage and reuse connections.and use pool as the package name inside the code.

Volley-demo - An demonstration of Volley - HTTP library announced by google in I/O 2013

  •    Java

An demonstration of Volley - HTTP library announced by google in I/O 2013. Android has provided two HTTP Clients AndroidHttpClient (Extended from apache HTTPClient) and HttpUrlConnection to make a HTTP Request. Both has its own pros and cons. When an application is developed, we write HTTP connection classes which handles all the HTTP requests, creating THREADS to run in background, managing THREAD pool, response parsing, response caching, handling error codes, SSL connections, running requests in parallel and others stuffs around that. Every developer has his own way of implementing these functionalities.Some might use AsycnTask for running network operations in background, or some might use passing handlers created from UI thread to HTTP connection classes which then executes network operation in worker thread and uses the handler to pass back the parsed HTTP response back to the main thread.

play-slick - Slick Plugin for Play

  •    Scala

Because Slick creates and manages both a connection pool and a thread pool, integrating Slick with Play boils down to ensuring that all resources allocated by Slick are shutdown when a Play application is stopped (or reloaded). The plugin has its own release cycle and therefore is not integrated into either core Play or Slick.

ants - 🐜⚡️A high-performance goroutine pool for go

  •    Go

Package ants implements a fixed goroutine pool for managing and recycling a massive number of goroutines, allowing developers to limit the number of goroutines that created by your concurrent programs. Don't worry about the synchronous problems in this case, this method is thread-safe.

MSDK - Multithreading SDK

  •    C++

Multithreading SDK: cross-platform synchronization primitives, thread support, and multithreading applications. All delivered as C++ classes. Supports Win32 (natively and MSVCRT) and Linux (Pthread).

Java Thread Pooling Framework

  •    

A Java framework for building flexible thread pool where threads can be allocated and recycled.

yew - Rust framework for building client web apps

  •    Rust

Yew is a modern Rust framework inspired by Elm and ReactJS for creating multi-threaded frontend apps with WebAssembly. NEW! The framework supports multi-threading & concurrency out of the box. It uses Web Workers API to spawn actors (agents) in separate threads and uses a local scheduler attached to a thread for concurrent tasks.