ITaskRunner.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #include <Bentley/Tasks/Tasks.h>
11 #include <memory>
12 
14 
15 struct AsyncTask;
16 struct ITaskScheduler;
17 
18 /*--------------------------------------------------------------------------------------+
19 * @bsiclass Bentley Systems
20 +---------------+---------------+---------------+---------------+---------------+------*/
21 struct ITaskRunner : public std::enable_shared_from_this<ITaskRunner>
22  {
23  public:
24  virtual void Start (std::shared_ptr<ITaskScheduler> scheduler, Utf8CP name = nullptr) = 0;
25  virtual void Stop () = 0;
26  virtual void WakeUp () = 0;
27  virtual bool IsRunning () const = 0;
28  virtual bool IsStopping () const = 0;
29 
30  virtual intptr_t GetId () const = 0;
31 
32  virtual std::shared_ptr<AsyncTask> GetCurrentRunningTask () = 0;
33  virtual std::shared_ptr<ITaskScheduler> GetTaskScheduler () = 0;
34  };
35 
Definition: ITaskRunner.h:21
Curve's start point.
#define BEGIN_BENTLEY_TASKS_NAMESPACE
Definition: Tasks.h:13
Utf8Char const * Utf8CP
Definition: Bentley.h:229
#define END_BENTLEY_TASKS_NAMESPACE
Definition: Tasks.h:14

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.