All Projects → chenluyong → Oeasypool

chenluyong / Oeasypool

Licence: other
c++11 thread pool

Projects that are alternatives of or similar to Oeasypool

YACLib
Yet Another Concurrency Library
Stars: ✭ 193 (+972.22%)
Mutual labels:  thread, thread-pool
haxe-concurrent
A haxelib for basic platform-agnostic concurrency support
Stars: ✭ 69 (+283.33%)
Mutual labels:  thread, thread-pool
python-PooledProcessMixIn
Fast Concurrent Pool of preforked-processes and threads MixIn for python's socket server
Stars: ✭ 31 (+72.22%)
Mutual labels:  thread, pool
Java Concurrency Examples
Java Concurrency/Multithreading Tutorial with Examples for Dummies
Stars: ✭ 173 (+861.11%)
Mutual labels:  thread, thread-pool
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 (+25888.89%)
Mutual labels:  thread, thread-pool
HiFramework.Unity
Based on component to manage project's core logic and module used in unity3d
Stars: ✭ 22 (+22.22%)
Mutual labels:  thread, pool
akali
C++ Common Library for Windows, Linux.
Stars: ✭ 34 (+88.89%)
Mutual labels:  thread, thread-pool
Hamsters.js
100% Vanilla Javascript Multithreading & Parallel Execution Library
Stars: ✭ 517 (+2772.22%)
Mutual labels:  thread, thread-pool
awesome-dotnet-async
A curated list of awesome articles and resources to learning and practicing about async, threading, and channels in .Net platform. 😉
Stars: ✭ 84 (+366.67%)
Mutual labels:  thread, thread-pool
fastthreadpool
An efficient and lightweight thread pool
Stars: ✭ 27 (+50%)
Mutual labels:  thread, pool
Concurrency
Java 并发编程知识梳理以及常见处理模式 features and patterns
Stars: ✭ 495 (+2650%)
Mutual labels:  thread, thread-pool
Concurrent Programming
🌵《实战java高并发程序设计》源码整理
Stars: ✭ 562 (+3022.22%)
Mutual labels:  thread, thread-pool
Ants
🐜🐜🐜 ants is a high-performance and low-cost goroutine pool in Go, inspired by fasthttp./ ants 是一个高性能且低损耗的 goroutine 池。
Stars: ✭ 7,180 (+39788.89%)
Mutual labels:  pool
Raftlib
The RaftLib C++ library, streaming/dataflow concurrency via C++ iostream-like operators
Stars: ✭ 717 (+3883.33%)
Mutual labels:  thread
Yappi
Yet Another Python Profiler, but this time thread&coroutine&greenlet aware.
Stars: ✭ 595 (+3205.56%)
Mutual labels:  thread
Pool
🚌 A golang general network connection poolction pool
Stars: ✭ 588 (+3166.67%)
Mutual labels:  pool
Chinese Podcasts
中文播客:Tech, Design, Science...
Stars: ✭ 816 (+4433.33%)
Mutual labels:  china
Swiftcoroutine
Swift coroutines for iOS, macOS and Linux.
Stars: ✭ 690 (+3733.33%)
Mutual labels:  thread
Grain
grain是一个极简的、组件式的RPC框架,灵活且适合渐进学习,可与任何框架整合。同时包含(系统通用多线程模型与消息通讯 || 多对多关系的分布式锁 || 基于Servlet的HTTP框架 || 基于系统通用多线程模型的Websocket框架 || 支持行级锁的多线程锁 )等组件,按需选择组件,不绑架开发者。
Stars: ✭ 577 (+3105.56%)
Mutual labels:  thread
Honeydew
Job Queue for Elixir. Clustered or Local. Straight BEAM. Optional Ecto. 💪🍈
Stars: ✭ 670 (+3622.22%)
Mutual labels:  pool

OEasyPool

The thread pool, is so simple and easy to use. Do you have any reason to refuse?

Presentation

Here are mainly introduced about the use of task thread pool and structure.

thread pool uml

Class

  • OETask

    task base class, pool call doWork function.

    derived class: main logic function.

    virtual int doWork() = 0;

  • OETaskQueue

    The management of the task,for example: add/sub/recall status.

  • OEThreadPool

    The processing of the thread pool

Extend

task thread pool extend, we provide a good solution. inherit OETask, complete the main logic function.

for example: see TaskTest.h.

Config

Regarding the thread pool configuration, we also set aside the interface

use class OEThreadPool :: struct tagThreadPoolConfig and function init, can config thread pool.

Code has more detailed comments, but I still want to post here again, though he is very simple, but it seems very important.

/// thread config
typedef struct tagThreadPoolConfig {
	int nMaxThreadsNum;		    /// max thread number
	int nMinThreadsNum;		    /// min thread number
	double dbTaskAddThreadRate;   /// add - max thread task rate (decide when to increase)
	double dbTaskSubThreadRate;   /// sub - max thread task rate (decide when to reduce)
} ThreadPoolConfig;

before init, thread pool didn't do anything.

Other

You didn't do anything, You get it.

I just hope find the insufficient, if you get wrong anything, please tell me. thanks.

Before this, you should star to it, I believe that it can keep in touch between you and me.

If you are an overseas Chinese who can contact the server in we home, you may need this article [Go].

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