Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / inference_engine / cpp_interfaces / ie_itask_executor.hpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6
7 #include <memory>
8 #include "ie_api.h"
9 #include "ie_task.hpp"
10
11 namespace InferenceEngine {
12
13 class INFERENCE_ENGINE_API_CLASS(ITaskExecutor) {
14 public:
15     typedef std::shared_ptr<ITaskExecutor> Ptr;
16
17     virtual ~ITaskExecutor() = default;
18
19     /**
20      * @brief Add task for execution and notify working thread about new task to start.
21      * @note can be called from multiple threads - tasks will be added to the queue and executed one-by-one in FIFO mode.
22      * @param task - shared pointer to the task to start
23      *  @return true if succeed to add task, otherwise - false
24      */
25     virtual bool startTask(Task::Ptr task) = 0;
26 };
27
28 }  // namespace InferenceEngine