You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "swebb2066 (via GitHub)" <gi...@apache.org> on 2023/12/06 06:12:01 UTC

[PR] Remove unused references to APR [logging-log4cxx]

swebb2066 opened a new pull request, #307:
URL: https://github.com/apache/logging-log4cxx/pull/307

   (no comment)


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove unused references to APR [logging-log4cxx]

Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 commented on code in PR #307:
URL: https://github.com/apache/logging-log4cxx/pull/307#discussion_r1418152450


##########
src/test/cpp/helpers/charsetencodertestcase.cpp:
##########
@@ -353,11 +357,10 @@ LOGUNIT_CLASS(CharsetEncoderTestCase)
 		private:
 			ThreadPackage(const ThreadPackage&);
 			ThreadPackage& operator=(ThreadPackage&);
-			Pool p;
 			std::mutex lock;
 			std::condition_variable condition;
-			volatile apr_uint32_t passCount;
-			volatile apr_uint32_t failCount;
+			apr_uint32_t passCount;

Review Comment:
   Changed to uint32_t



-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove unused references to APR [logging-log4cxx]

Posted by "vopl (via GitHub)" <gi...@apache.org>.
vopl commented on code in PR #307:
URL: https://github.com/apache/logging-log4cxx/pull/307#discussion_r1416733082


##########
src/test/cpp/helpers/charsetencodertestcase.cpp:
##########
@@ -257,22 +257,26 @@ LOGUNIT_CLASS(CharsetEncoderTestCase)
 
 			void fail()
 			{
-				apr_atomic_inc32(&failCount);
+				std::unique_lock<std::mutex> sync(lock);

Review Comment:
   std::unique_lock has a redundant functional, use std::scoped_lock (c++17) or std::lock_guard (c++11) instead



-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove unused references to APR [logging-log4cxx]

Posted by "rm5248 (via GitHub)" <gi...@apache.org>.
rm5248 commented on code in PR #307:
URL: https://github.com/apache/logging-log4cxx/pull/307#discussion_r1418041038


##########
src/test/cpp/helpers/charsetencodertestcase.cpp:
##########
@@ -353,11 +357,10 @@ LOGUNIT_CLASS(CharsetEncoderTestCase)
 		private:
 			ThreadPackage(const ThreadPackage&);
 			ThreadPackage& operator=(ThreadPackage&);
-			Pool p;
 			std::mutex lock;
 			std::condition_variable condition;
-			volatile apr_uint32_t passCount;
-			volatile apr_uint32_t failCount;
+			apr_uint32_t passCount;

Review Comment:
   should we just change these to `uint32_t` and ignore APR?  And/or use `std::atomic`?



-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Remove unused references to APR [logging-log4cxx]

Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 merged PR #307:
URL: https://github.com/apache/logging-log4cxx/pull/307


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org