From 910f7cd95b53af49e2512bcaa2c8335944fa3b2f Mon Sep 17 00:00:00 2001 From: Barak Shoshany Date: Wed, 2 Jun 2021 10:38:24 -0400 Subject: [PATCH] Updated to v1.7 --- README.md | 2 ++ thread_pool.hpp | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 91e7dd8..30015fc 100644 --- a/README.md +++ b/README.md @@ -701,6 +701,8 @@ An interesting point to notice is that for **single-threaded** calculations (1 b ## Version history +* Version 1.7 (2021-06-02) + * Fixed a bug in `parallelize_loop()` which prevented it from actually running loops in parallel, see [this issue](https://github.com/bshoshany/thread-pool/issues/11). * Version 1.6 (2021-05-26) * Since MSVC does not interpret `and` as `&&` by default, the previous release did not compile with MSVC unless the `/permissive-` or `/Za` compiler flags were used. This has been fixed in this version, and the code now successfully compiles with GCC, Clang, and MSVC. See [this pull request](https://github.com/bshoshany/thread-pool/pull/10). * Version 1.5 (2021-05-07) diff --git a/thread_pool.hpp b/thread_pool.hpp index bea4b7f..44381f3 100644 --- a/thread_pool.hpp +++ b/thread_pool.hpp @@ -3,8 +3,8 @@ /** * @file thread_pool.hpp * @author Barak Shoshany (baraksh@gmail.com) (http://baraksh.com) - * @version 1.6 - * @date 2021-05-26 + * @version 1.7 + * @date 2021-06-02 * @copyright Copyright (c) 2021 Barak Shoshany. Licensed under the MIT license. If you use this library in published research, please cite it as follows: * - Barak Shoshany, "A C++17 Thread Pool for High-Performance Scientific Computing", doi:10.5281/zenodo.4742687, arXiv:2105.00613 (May 2021) * @@ -142,10 +142,10 @@ public: loop(i); blocks_running--; }); - while (blocks_running != 0) - { - sleep_or_yield(); - } + } + while (blocks_running != 0) + { + sleep_or_yield(); } }