协程架构重构成功, 下一步准备指针交换 无锁化重构
This commit is contained in:
@@ -2,17 +2,30 @@
|
||||
#include "../GlobalTypes.h"
|
||||
#include "Core/Base/global_include.h"
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <QThread>
|
||||
#include <qrgb.h>
|
||||
|
||||
extern int qInitResources_resource();
|
||||
namespace asio {
|
||||
class io_context;
|
||||
}
|
||||
namespace YSG {
|
||||
struct TimerThreadPrivate;
|
||||
class LIB_DECL TimerThread : public QThread {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QList<Plot*> mPlots;
|
||||
TimerThread();
|
||||
~TimerThread() override;
|
||||
void run() override;
|
||||
void post(std::function<void()> task);
|
||||
void postCpu(std::function<void()> task);
|
||||
bool isSchedulerThread() const;
|
||||
asio::io_context& ioContext();
|
||||
private:
|
||||
std::unique_ptr<TimerThreadPrivate> d;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user