lordgamez commented on code in PR #1383:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1383#discussion_r946619201


##########
libminifi/include/utils/BaseHTTPClient.h:
##########
@@ -51,38 +39,30 @@ struct HTTPProxy {
   int port = 0;
 };
 
-struct HTTPUploadCallback {
-  HTTPUploadCallback() {
-    stop = false;
-    ptr = nullptr;
-    pos = 0;
-  }
-  std::mutex mutex;
-  std::atomic<bool> stop;
-  ByteInputCallback *ptr;
-  size_t pos;
+class HTTPUploadCallback : public ByteInputCallback {
+ public:
+  template<typename... Args>
+  explicit HTTPUploadCallback(Args&& ... args) : 
ByteInputCallback(std::forward<Args>(args)...) {}
 
   size_t getPos() {
-    std::lock_guard<std::mutex> lock(mutex);
     return pos;
   }

Review Comment:
   After removing the lock is this strictly needed anymore? The position member 
is public and could be used as it is. Same for HTTPReadCallback



-- 
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: issues-unsubscr...@nifi.apache.org

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

Reply via email to