nareshmlx/opencv-pr huggingface dataset:
**File:** modules/core/include/opencv2/core/opencl/opencl_info.hpp
**Change Type:** modified
**Context:** PR #24918: core(OpenCL): optimize convertTo() with CV_16F (convertFp16() replacement) - relates #24909 relates #24917 relates #24892 Performance chang...
**Review Line:** 144

**Code Changes:**
```diff
@@ -141,13 +141,13 @@ static void dumpOpenCLInformation()
         DUMP_MESSAGE_STDOUT("    Max memory allocation size = " << maxMemAllocSizeStr);
         DUMP_CONFIG_PROPERTY("cv_ocl_current_maxMemAllocSize", device.maxMemAllocSize());
 
-        const char* doubleSupportStr = device.doubleFPConfig() > 0 ? "Yes" : "No";
+        const char* doubleSupportStr = device.hasFP64() ? "Yes" : "No";
         DUMP_MESSAGE_STDOUT("    Double support = " << doubleSupportStr);
-        DUMP_CONFIG_PROPERTY("cv_ocl_current_haveDoubleSupport", device.doubleFPConfig() > 0);
+        DUMP_CONFIG_PROPERTY("cv_ocl_current_haveDoubleSupport", device.hasFP64());
 
-        const char* halfSupportStr = device.halfFPConfig() > 0 ? "Yes" : "No";
```

Review comment:
Usage is not correct.
**File:** modules/core/include/opencv2/core/opencl/opencl_info.hpp
**Change Type:** modified
**Context:** PR #24918: core(OpenCL): optimize convertTo() with CV_16F (convertFp16() replacement) - relates #24909 relates #24917 relates #24892 Performance chang...
**Review Line:** 144

**Code Changes:**
```diff
@@ -141,13 +141,13 @@ static void dumpOpenCLInformation()
         DUMP_MESSAGE_STDOUT("    Max memory allocation size = " << maxMemAllocSizeStr);
         DUMP_CONFIG_PROPERTY("cv_ocl_current_maxMemAllocSize", device.maxMemAllocSize());
 
-        const char* doubleSupportStr = device.doubleFPConfig() > 0 ? "Yes" : "No";
+        const char* doubleSupportStr = device.hasFP64() ? "Yes" : "No";
         DUMP_MESSAGE_STDOUT("    Double support = " << doubleSupportStr);
-        DUMP_CONFIG_PROPERTY("cv_ocl_current_haveDoubleSupport", device.doubleFPConfig() > 0);
+        DUMP_CONFIG_PROPERTY("cv_ocl_current_haveDoubleSupport", device.hasFP64());
 
-        const char* halfSupportStr = device.halfFPConfig() > 0 ? "Yes" : "No";
```

Review comment:
What is the correct way? All these code is wrong?
**File:** modules/core/include/opencv2/core/opencl/opencl_info.hpp
**Change Type:** modified
**Context:** PR #24918: core(OpenCL): optimize convertTo() with CV_16F (convertFp16() replacement) - relates #24909 relates #24917 relates #24892 Performance chang...
**Review Line:** 144

**Code Changes:**
```diff
@@ -141,13 +141,13 @@ static void dumpOpenCLInformation()
         DUMP_MESSAGE_STDOUT("    Max memory allocation size = " << maxMemAllocSizeStr);
         DUMP_CONFIG_PROPERTY("cv_ocl_current_maxMemAllocSize", device.maxMemAllocSize());
 
-        const char* doubleSupportStr = device.doubleFPConfig() > 0 ? "Yes" : "No";
+        const char* doubleSupportStr = device.hasFP64() ? "Yes" : "No";
         DUMP_MESSAGE_STDOUT("    Double support = " << doubleSupportStr);
-        DUMP_CONFIG_PROPERTY("cv_ocl_current_haveDoubleSupport", device.doubleFPConfig() > 0);
+        DUMP_CONFIG_PROPERTY("cv_ocl_current_haveDoubleSupport", device.hasFP64());
 
-        const char* halfSupportStr = device.halfFPConfig() > 0 ? "Yes" : "No";
```

Review comment:
All are subject for revising.
**File:** modules/objdetect/src/aruco/aruco_board.cpp
**Change Type:** modified
**Context:** PR #24873: Fix generateImage for charuco chessboard

**Code Changes:**
```diff
@@ -483,39 +483,44 @@ void CharucoBoardImpl::generateImage(Size outSize, OutputArray img, int marginSi
     Mat noMarginsImg =
         out.colRange(marginSize, out.cols - marginSize).rowRange(marginSize, out.rows - marginSize);
 
-    double totalLengthX, totalLengthY;
-    totalLengthX = squareLength * size.width;
-    totalLengthY = squareLength * size.height;
-
-    // proportional transformation
-    double xReduction = totalLengthX / double(noMarginsImg.cols);
```

Review comment:
double is redundant here, e.g.: ``` float startX = pixInSquare * x; float startY = pixInSquare * y; Mat squareZone = chessboardZoneImg(Range(cvRound(startY), cvRound(startY + pixInSquare)), Range(cvRound(startX), cvRound(startX + pixInSquare))); ```
**File:** modules/objdetect/src/aruco/aruco_board.cpp
**Change Type:** modified
**Context:** PR #24873: Fix generateImage for charuco chessboard

**Code Changes:**
```diff
@@ -483,39 +483,44 @@ void CharucoBoardImpl::generateImage(Size outSize, OutputArray img, int marginSi
     Mat noMarginsImg =
         out.colRange(marginSize, out.cols - marginSize).rowRange(marginSize, out.rows - marginSize);
 
-    double totalLengthX, totalLengthY;
-    totalLengthX = squareLength * size.width;
-    totalLengthY = squareLength * size.height;
-
-    // proportional transformation
-    double xReduction = totalLengthX / double(noMarginsImg.cols);
```

Review comment:
added float
**File:** modules/gapi/test/gapi_sample_pipelines.cpp
**Change Type:** modified
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -13,6 +13,8 @@
 
 #include <opencv2/gapi/core.hpp>
 
+#include "executor/thread_pool.hpp"
+
 namespace opencv_test
 {
 
@@ -67,6 +69,38 @@ namespace
```

Review comment:
Was a temp test, need to remove
**File:** modules/gapi/src/executor/thread_pool.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,67 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "thread_pool.hpp"
+
```

Review comment:
awful, worth a comment at least
**File:** modules/gapi/src/executor/thread_pool.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,67 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "thread_pool.hpp"
+
```

Review comment:
Definitely shouldn't be in loop...
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
This part is pure copy-paste from `gexecutor.cpp`, perhaps it should be somewhere in common (e.g gcommon.hpp)
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
Removing lock causes the data race even though `magazine::getArg` is supposed to be a read operation
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
I assume it's impossible that two `Island`'s write to the same memory in parallel but it caused data race if mutex isn't used
**File:** modules/gapi/src/executor/gthreadedexecutor.hpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,123 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#ifndef OPENCV_GAPI_GTHREADEDEXECUTOR_HPP
+#define OPENCV_GAPI_GTHREADEDEXECUTOR_HPP
```

Review comment:
`exec()` is redundant for `IslandActor`, in fact `GIslandExecutable::Ptr` can be stored & accessed in `GThreadedExecutor` and passed to `IslandActor` by pointer/reference.
**File:** modules/gapi/src/executor/thread_pool.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,67 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "thread_pool.hpp"
+
```

Review comment:
In fact it's not necessarily to acquire the mutex on `add()` method, `task_counter` might be an `atomic`. But since we still need the `mutex` for `wait` (as it's uses condvar) `atomic` + `mutex` seems the weird combination and didn't give any significant performance improvements. Decided to keep it simple so far. If fact `WaitGroup` can be implemented without condvar and mutex by using 2 atomics. But it requires c++20 for this thing: https://en.cppreference.com/w/cpp/atomic/atomic/wait
**File:** modules/gapi/src/executor/thread_pool.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,67 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "thread_pool.hpp"
+
```

Review comment:
`ThreadSanitizer` also signals problems when `schedule` is called from different threads but it seems to be fine since both `WaitGroup::add()` and `Queue::push` are supposed to be thread-safe
**File:** modules/gapi/src/executor/thread_pool.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor
**Review Line:** 57

**Code Changes:**
```diff
+};
+
+void cv::gapi::own::ThreadPool::shutdown() {
+    for (size_t i = 0; i < m_workers.size(); ++i) {
+        // NB: Empty task - is an indicator for workers to stop their loops
+        m_queue.push({});
+    }
+    for (auto& worker : m_workers) {
+        worker.join();
+    }
+    m_workers.clear();
```

Review comment:
Empty task - termination criterion for the worker, at least worth a comment...
**File:** modules/gapi/src/executor/thread_pool.hpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor
**Review Line:** 19

**Code Changes:**
```diff
+#include <atomic>
+#include <condition_variable>
+
+#include <opencv2/gapi/own/exports.hpp> // GAPI_EXPORTS
+
+#if defined(HAVE_TBB)
+#  include <tbb/concurrent_queue.h> // FIXME: drop it from here!
+template<typename T> using QueueClass = tbb::concurrent_bounded_queue<T>;
+#else
+#  include "executor/conc_queue.hpp"
+template<typename T> using QueueClass = cv::gapi::own::concurrent_bounded_queue<T>;
```

Review comment:
Yet another copy-paste of this thing
**File:** modules/gapi/include/opencv2/gapi/gcommon.hpp
**Change Type:** modified
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -263,12 +263,32 @@ struct graph_dump_path
 };
 /** @} */
 
+/**
+ * @brief Ask G-API to use threaded executor when cv::GComputation
+ * is compiled via cv::GComputation::compile method.
+ *
+ * Specifies a number of threads that should be used by executor.
+ */
```

Review comment:
probably here we should stick to the OpenCV thread settings: https://docs.opencv.org/4.9.0/db/de0/group__core__utils.html#ga2db334ec41d98da3129ef4a2342fc4d4
**File:** modules/gapi/include/opencv2/gapi/gcommon.hpp
**Change Type:** modified
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -263,12 +263,32 @@ struct graph_dump_path
 };
 /** @} */
 
+/**
+ * @brief Ask G-API to use threaded executor when cv::GComputation
+ * is compiled via cv::GComputation::compile method.
+ *
+ * Specifies a number of threads that should be used by executor.
+ */
```

Review comment:
...but normally it is needed to respond/handle to the setNumThreads() which sets # of threads to OpenCV _globally_ (as it is still a set of standalone functions)
**File:** modules/gapi/include/opencv2/gapi/gcommon.hpp
**Change Type:** modified
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -263,12 +263,32 @@ struct graph_dump_path
 };
 /** @} */
 
+/**
+ * @brief Ask G-API to use threaded executor when cv::GComputation
+ * is compiled via cv::GComputation::compile method.
+ *
+ * Specifies a number of threads that should be used by executor.
+ */
```

Review comment:
Should be exposed into python later
**File:** modules/gapi/CMakeLists.txt
**Change Type:** modified
**Context:** PR #24845: G-API: Implement concurrent executor
**Review Line:** 128

**Code Changes:**
```diff
     src/executor/gexecutor.cpp
     src/executor/gtbbexecutor.cpp
+    src/executor/gthreadedexecutor.cpp
     src/executor/gstreamingexecutor.cpp
     src/executor/gasync.cpp
+    src/executor/thread_pool.cpp
 
     # CPU Backend (currently built-in)
     src/backends/cpu/gcpubackend.cpp
```

Review comment:
is it a third thread pool in this only module? :)
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
normally we have `break` in the following line
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
(or the whole `case ...: ...; break` in a single line)
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor
**Review Line:** 97

**Code Changes:**
```diff
+    case GRunArgP::index_of<cv::RMat*>() : /* do nothing */ break;
+    default: util::throw_error(std::logic_error("content type of the runtime argument does not match to resource description ?"));
+    }
+}
+
+void assignMetaStubExec(Mag& mag, const RcDesc &rc, const cv::GRunArg::Meta &meta) {
+    switch (rc.shape) {
+    case GShape::GARRAY:  mag.meta<cv::detail::VectorRef>()[rc.id] = meta; break;
+    case GShape::GOPAQUE: mag.meta<cv::detail::OpaqueRef>()[rc.id] = meta; break;
+    case GShape::GSCALAR: mag.meta<cv::Scalar>()[rc.id]            = meta; break;
+    case GShape::GFRAME:  mag.meta<cv::MediaFrame>()[rc.id]        = meta; break;
```

Review comment:
there won't be a race if we statically preallocate the magazine for all relevant `[rc.id]`s in all relevant types, but the mutex is fine and we can do that later.
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
I believe it is an abstraction leak to expose 1) a data structure and 2) its protection mutex by a _reference_ to some external context like this. If the goal of this whole stub is to populate an input vector for an island, you can query the object who owns those two (a magazine and a mutex) to do that for you. Then this thread safety concern falls to that context. So what you could do instead is to have a `GraphState` structure - representing a running graph - and host the magazine in. The pro of this way is that later you may have a single executor serving multiple executable graphs - to their state will be clearly separated one from another.
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
Assuming the suggestion above, this could be just ```suggestion virtual StreamMsg get() override { return StreamMsg{graph_state.getInputVector(desc())}; } ```
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
In fact this access also should be protected...
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
Same suggestion applies as for input -> move the data structure & its protected to another level of details
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
You could replace these two with your `GraphState` reference here, too. And no need to think of synchronization
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
Why are the inputs/outputs created right before run? I believe they could be created in the ctor and then reused across runs? They are lazy and their sense and only do the job when are called to?
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor
**Review Line:** 231

**Code Changes:**
```diff
+      m_outputs(state, out_objects) {
+}
+
+void cv::gimpl::IslandActor::run() {
+    m_isl_exec->run(m_inputs, m_outputs);
+}
+
+void cv::gimpl::IslandActor::verify() {
+    m_outputs.verify();
+};
+
```

Review comment:
Doubtful if you need this structure at all.. You can merge it with `Task` - if only you don't want to make a generic thread pool later.
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
so what is this? a vector of tasks which **depend** on this one (I am reading this word here like this) or a vector of tasks which **unblock** this one? Maybe here you need to call it "consumers", and...
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
..here rename `deps` to `producers`?
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
..to make this loop clear. dep dep dep dep
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
```suggestion if (++dep->m_ready_deps == dep->m_num_deps) { ```
**File:** modules/gapi/src/executor/gthreadedexecutor.cpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,511 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+
+#include "precomp.hpp"
+
```

Review comment:
so the thread pool is shared among the different graphs, right?
**File:** modules/gapi/src/executor/thread_pool.hpp
**Change Type:** added
**Context:** PR #24845: G-API: Implement concurrent executor

**Code Changes:**
```diff
@@ -0,0 +1,71 @@
+// This file is part of OpenCV project.
+// 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) 2024 Intel Corporation
+
+#ifndef OPENCV_GAPI_THREAD_POOL_HPP
+#define OPENCV_GAPI_THREAD_POOL_HPP
+
```

Review comment:
Is this what you've been looking for? https://en.cppreference.com/w/cpp/thread/barrier