This is a multi threading library in C, built as an abstraction layer over pthread (POSIX threads) library.
- job: A wrapper to submit a task to be done, with a promise for completion.
- executor: A (cached or fixed-thread-count) thread pool based job execution API, similar to Java's ExecutorService.
Install dependencies :
Download source code :
git clone https://github.com/RohanVDvivedi/BoomPar.git
Build from source :
cd BoomPar
make clean all
Install from the build :
sudo make install
- Once you have installed from source, you may discard the build by
make clean
- add
-lboompar -lpthread -lcutlery
linker flag, while compiling your application - do not forget to include appropriate public api headers as and when needed. this includes
-
#include<job.h>
-
#include<promise.h>
-
#include<executor.h>
-
#include<sync_pipe.h>
can be used to share data among different jobs running on separate threads. -
#include<worker.h>
and#include<sync_queue.h>
api header are ony required if you want to build your own custom executor, which may not be necessary.
-
Uninstall :
cd BoomPar
sudo make uninstall