forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'conan-io:master' into master
- Loading branch information
Showing
58 changed files
with
436 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1275,3 +1275,6 @@ authorized_users: | |
- anthonyliot | ||
- obnyis | ||
- johningve | ||
- stefansli | ||
- wgtmac | ||
- kevinAlbs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 6 additions & 47 deletions
53
recipes/bshoshany-thread-pool/all/test_package/test_package.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,18 @@ | ||
#include "BS_thread_pool.hpp" | ||
|
||
BS::synced_stream sync_out; | ||
BS::thread_pool pool; | ||
|
||
std::condition_variable ID_cv, total_cv; | ||
std::mutex ID_mutex, total_mutex; | ||
BS::concurrency_t count_unique_threads() | ||
{ | ||
const BS::concurrency_t num_tasks = pool.get_thread_count() * 2; | ||
std::vector<std::thread::id> thread_IDs(num_tasks); | ||
std::unique_lock<std::mutex> total_lock(total_mutex); | ||
BS::concurrency_t total_count = 0; | ||
bool ID_release = false; | ||
pool.wait_for_tasks(); | ||
for (std::thread::id& id : thread_IDs) | ||
pool.push_task( | ||
[&total_count, &id, &ID_release] | ||
{ | ||
id = std::this_thread::get_id(); | ||
{ | ||
const std::scoped_lock total_lock_local(total_mutex); | ||
++total_count; | ||
} | ||
total_cv.notify_one(); | ||
std::unique_lock<std::mutex> ID_lock_local(ID_mutex); | ||
ID_cv.wait(ID_lock_local, [&ID_release] { return ID_release; }); | ||
}); | ||
total_cv.wait(total_lock, [&total_count] { return total_count == pool.get_thread_count(); }); | ||
{ | ||
const std::scoped_lock ID_lock(ID_mutex); | ||
ID_release = true; | ||
} | ||
ID_cv.notify_all(); | ||
total_cv.wait(total_lock, [&total_count, &num_tasks] { return total_count == num_tasks; }); | ||
pool.wait_for_tasks(); | ||
std::sort(thread_IDs.begin(), thread_IDs.end()); | ||
return static_cast<BS::concurrency_t>(std::unique(thread_IDs.begin(), thread_IDs.end()) - thread_IDs.begin()); | ||
} | ||
#include <iostream> | ||
|
||
int main() | ||
{ | ||
const char* line = "------------------------------------------"; | ||
sync_out.println(line); | ||
sync_out.println("Testing thread pool..."); | ||
BS::concurrency_t unique_threads = count_unique_threads(); | ||
if (pool.get_thread_count() == unique_threads) | ||
BS::thread_pool pool; | ||
std::cout << "Testing thread pool...\n"; | ||
if (pool.get_thread_count() == std::thread::hardware_concurrency()) | ||
{ | ||
sync_out.println("SUCCESS: Created ", unique_threads, " unique threads!"); | ||
sync_out.println(line); | ||
std::cout << "SUCCESS: Created " << pool.get_thread_count() << " unique threads!\n"; | ||
return EXIT_SUCCESS; | ||
} | ||
else | ||
{ | ||
sync_out.println("ERROR: Failed to create ", unique_threads, " unique threads!"); | ||
sync_out.println(line); | ||
std::cout << "ERROR: Failed to create " << pool.get_thread_count() << " unique threads!\n"; | ||
return EXIT_FAILURE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
versions: | ||
"4.0.1": | ||
folder: all | ||
"3.5.0": | ||
folder: all | ||
"3.4.0": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
versions: | ||
"2.13.0": | ||
folder: all | ||
"2.12.0": | ||
folder: all | ||
"2.11.3": | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
sources: | ||
"1.4.0": | ||
url: "https://github.com/rlogiacco/CircularBuffer/archive/refs/tags/1.4.0.tar.gz" | ||
sha256: "e01a837d2fe46fea168e8d36e1a4225d9414a855484d55b5a240f239ab53fc0a" | ||
"1.3.3": | ||
url: "https://github.com/rlogiacco/CircularBuffer/archive/refs/tags/1.3.3.tar.gz" | ||
sha256: "d558029c9ab5012a8bbf9a89bd130eb320bdeb69e3f8bd96851ddc1e5dc24eba" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
versions: | ||
"1.4.0": | ||
folder: all | ||
"1.3.3": | ||
folder: all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
sources: | ||
"0.4.1": | ||
url: "https://github.com/mfontanini/cppkafka/archive/refs/tags/v0.4.1.tar.gz" | ||
sha256: "45770ae0404cb9ba73d659618c51cd55b574c66ed3c7b148360222fb524b0ff7" | ||
"0.4.0": | ||
url: "https://github.com/mfontanini/cppkafka/archive/refs/tags/0.4.0.tar.gz" | ||
sha256: "f4f05eb7a180a856663b02ec0b777283275ef88e5523f3013fd51c6c4ab63b5a" | ||
patches: | ||
"0.4.1": | ||
- patch_file: "patches/0.4.0-0001-no-template-export.patch" | ||
- patch_file: "patches/0.4.1-0003-clean-rpath.patch" | ||
"0.4.0": | ||
- patch_file: "patches/0001-no-template-export.patch" | ||
- patch_file: "patches/0002-cppstd.patch" | ||
- patch_file: "patches/0003-clean-rpath.patch" | ||
- patch_file: "patches/0.4.0-0001-no-template-export.patch" | ||
- patch_file: "patches/0.4.0-0002-cppstd.patch" | ||
- patch_file: "patches/0.4.0-0003-clean-rpath.patch" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 6c667df..46c5590 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -28,7 +28,7 @@ if (NOT CMAKE_CXX_FLAGS) | ||
add_definitions("-DNOGDI=1") | ||
add_definitions("-DNOMINMAX=1") | ||
else() | ||
- set(CMAKE_CXX_FLAGS "-Wall") | ||
+# set(CMAKE_CXX_FLAGS "-Wall") | ||
endif() | ||
endif() | ||
|
||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 214ccd4..d2667ce 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -46,8 +46,8 @@ set_target_properties(${TARGET_NAME} PROPERTIES | ||
ARCHIVE_OUTPUT_NAME "${TARGET_NAME}" | ||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_INSTALL_LIBDIR}" | ||
LIBRARY_OUTPUT_NAME "${TARGET_NAME}" | ||
- INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}" | ||
- INSTALL_RPATH_USE_LINK_PATH TRUE | ||
+ # INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}" | ||
+ # INSTALL_RPATH_USE_LINK_PATH TRUE | ||
VERSION ${CPPKAFKA_VERSION} | ||
SOVERSION ${CPPKAFKA_VERSION}) | ||
# In CMake >= 3.15 Boost::boost == Boost::headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
versions: | ||
"0.4.1": | ||
folder: "all" | ||
"0.4.0": | ||
folder: "all" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.