-
Notifications
You must be signed in to change notification settings - Fork 0
C++ library proposing a set of high level classes for threads management
License
LGPL-3.0, GPL-3.0 licenses found
Licenses found
LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Edrusb/libthreadar
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
What is libthreadar libthreadar provides C++ classes for manipulating threads and propagating back exception from thread to parent thread when the parent calls the join() method [ same paradygm as what wait() system calls does for a forked ] [ process to its parent ] What it is relying on libthreadar relies on Posix thread for historical reason, this might change in the future to rely on C++11 thread without any impact on the API. Which compiler to use with libthreadar To propagate exception of any type libthreadar use C++11 specific construction, so it requires such compiler to be compiled and linked with. Why that strange name libthreadar has been extracted from code initially part of webdar and also now used by dar and libdar, where from its "dar" ending name. However this library is not part of webdar, libdar or dar, is released separately and can be used independently of them. What the advantages of libthreadar over c++11 or boost thread? C++11 defines threads as function base operation while libthreadar defines it as a class base operation. Boost cannot transmit any type of exception back to a parent thread: Libthreadar defines a pure virtual class "thread" you have to inherit your own class from and define just one method that will be run from a separated thread. So far the difference is tight, right. But once a thread object is created the correspponding thread is not run until you call the run() method. It means also that once it has finished you can run it again without the overhead of passing again arguments and defining data structure available to that thread. Doing that way, it is much easier to pass a lot of arguments after construction time by calling several more simple and readable adhoc customized methods defined at your will in your inherited class, than having many arguments to pass to a single call that does also start the thread execution. Doing that way also let you define private fields that only the thread will have access to and thus access in total security and performance (no mutex required, and so on). You also may provide methods for your class to interact with the running thread and have mutex as private field that let the class manage the inter-thread communications in total transparency to the user of that class. libthreadar also provides mutex semaphore and other C++ class adapted to what you can find from Posix thread library, but keep in mind that current version is very simple (no detached thread, no interface to scheduler, just threads in there pure simple form...) Libthreadar has not the pretention to replace boost or any other library or C++ standard managing threads from C++ code. Is is rather to be seen as a more convenient and simple way to use thread withing C++ code. However this project is extensible (this project is open source), any contribution that has some value is welcome. Libthreadar Licensing: Libthreadar is released under the GNU LESSER GENERAL PUBLIC LICENSE. For details about this library license see the COPYING and COPYING.LESSER files. Download You can download from github or git at sourceforge but you will need the auto-tools (automake, autoconf, libtool...) to create the configure script. You can instead download ready for use source code (having an the configure script built) from sourceforge: https://sourceforge.net/projects/libthreadar/files/ You will find signature beside those packages, see the "Authentication" paragraph at http://dar.linux.free.fr/ for signature validation. Detailed documentation documentation is available online here https://libthreadar.sourceforge.net/ it is built from Doxygen comments found in source code.
About
C++ library proposing a set of high level classes for threads management
Topics
Resources
License
LGPL-3.0, GPL-3.0 licenses found
Licenses found
LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Stars
Watchers
Forks
Packages 0
No packages published