# threadpp **Repository Path**: zpflying/threadpp ## Basic Information - **Project Name**: threadpp - **Description**: No description available - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-26 - **Last Updated**: 2023-11-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # threadpp Light-weight cross-platform thread/mutex implementations including win32, win8,linux,macOS,iOS,android. ## Features Threads.
Locks.
Recursive locks.
Condition variables (integrated with lock).
##Advantages Extremely light weight.
Headers only (No compilation pitfalls).
Cross platform (Windows, any POSIX compatible OS or any C++11 supported platforms)
No preprocess macros needed.
Compatible with prior C++11 compilers.
## Sample: >\#include "threadpp.h" > >using namespace threadpp; > >recursivelock l; > >void thread_callback(void* context) >{ > > l.lock(); > > l.wait();//wait-notify paradigm,will be wake up by main in 3 seconds > > printf("hello from thread:%llu\n",thread::current_thread_id()); > > l.unlock(); > >} > > >int main(int argc,const char** argv) >{ > > thread t(thread_callback,NULL); > > thread::sleep(3000); > > l.notify_all();//wait-notify paradigm. > > t.join(); > >}