You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated the source files, as well as README.md, CITATION.bib, and CITATION.cff with the new citation.
A new macro, BS_THREAD_POOL_DISABLE_EXCEPTION_HANDLING, allows the user to disable exception handling in submit_task() if it is not needed, or if exceptions are explicitly disabled in the codebase. See #139.
Note that this macro can be defined independently of BS_THREAD_POOL_ENABLE_WAIT_DEADLOCK_CHECK. Disabling exception handling removes the try-catch block from submit_task(), while enabling wait deadlock checks adds a throw expression to wait(), wait_for(), and wait_until().
If the feature-test macro __cpp_exceptions is undefined, BS_THREAD_POOL_DISABLE_EXCEPTION_HANDLING is automatically defined, and BS_THREAD_POOL_ENABLE_WAIT_DEADLOCK_CHECK is automatically undefined.
Replaced #pragma once with old-school include guards using the macros BS_THREAD_POOL_HPP and BS_THREAD_POOL_UTILS_HPP. There are two main reasons for this:
Even though #pragma once is supported by the vast majority of modern compilers, it is still a non-standard feature, so using it technically made the library not standards compliant.
Include guards make it possible to include the library twice in the same project (for example, once with priority enabled and once without) by undefining the include guard and putting the second include in its own namespace.
Included a description of the destructor behavior for the BS::thread_pool class in README.md, in the library reference section. See #143.
Removed unnecessary locking in reset() if pausing is not enabled.