协程架构重构成功, 下一步准备指针交换 无锁化重构

This commit is contained in:
2026-07-23 08:51:05 +08:00
parent 8c8cc8707b
commit c3e96d2f86
13 changed files with 475 additions and 230 deletions
+13
View File
@@ -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;
};