1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
10 #include <condition_variable>
14 #include "details/ie_exception.hpp"
15 #include "cpp_interfaces/exception2status.hpp"
16 #include "cpp_interfaces/ie_task.hpp"
17 #include "ie_task_synchronizer.hpp"
19 namespace InferenceEngine {
22 * This class represents a task which can have several stages
23 * and can be migrated from one task executor to another one
24 * between stages. This is required to continue execution of the
25 * task with special lock for device
27 class INFERENCE_ENGINE_API_CLASS(StagedTask) : public Task {
29 typedef std::shared_ptr<StagedTask> Ptr;
31 StagedTask(std::function<void()> function, size_t stages);
35 Status runNoThrowNoBusyCheck() noexcept override;
50 } // namespace InferenceEngine