Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / fluid / modules / gapi / src / api / gcall.cpp
index 2dd823d..e035052 100644 (file)
@@ -2,7 +2,7 @@
 // It is subject to the license terms in the LICENSE file found in the top-level directory
 // of this distribution and at http://opencv.org/license.html.
 //
-// Copyright (C) 2018 Intel Corporation
+// Copyright (C) 2018-2019 Intel Corporation
 
 
 #include "precomp.hpp"
@@ -28,9 +28,14 @@ cv::GCall::GCall(const cv::GKernel &k)
 
 cv::GCall::~GCall()
 {
+    // FIXME: current behavior of the destructor can cause troubles in a threaded environment. GCall
+    // is not supposed to be accessed for modification within multiple threads. There should be a
+    // way to ensure somehow that no problem occurs in future. For now, this is a reminder that
+    // GCall is not supposed to be copied inside a code block that is executed in parallel.
+
     // When a GCall object is destroyed (and GCall::Priv is likely still alive,
     // as there might be other references), reset m_node to break cycle.
-   m_priv->m_node = GNode();
+    m_priv->m_node = GNode();
 }
 
 void cv::GCall::setArgs(std::vector<GArg> &&args)