martinzink commented on code in PR #1581:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1581#discussion_r1211807969
##########
libminifi/src/utils/ThreadPool.cpp:
##########
@@ -151,10 +153,10 @@ void ThreadPool<T>::manageWorkers() {
if (nullptr != thread_manager_) {
while (running_) {
- auto waitperiod = std::chrono::milliseconds(500);
+ auto wait_period = 500ms;
{
- std::unique_lock<std::recursive_mutex> lock(manager_mutex_,
std::try_to_lock);
- if (!lock.owns_lock()) {
+ std::unique_lock<std::recursive_mutex> manager_lock(manager_mutex_,
std::try_to_lock);
+ if (!manager_lock.owns_lock()) {
Review Comment:
I think you are right, since we couldnt find anything that would indicate
this was conscious choice 3 years ago I think its safe to modify so it retries
to lock it after this 10ms.
https://github.com/apache/nifi-minifi-cpp/pull/1581/commits/4f5a1c9f14b7e49eeed18d2dfcb0582ef35e8186#diff-7bc3087dc395ad862c065930e775dfbaf79006c55df75e6a4c055b03cd4586b6R159-R160
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]