fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import type { WorkerBaseAction } from "./action/worker.action";
|
|
|
|
import { WorkerThreadController } from "./controller/worker.worker_thread.controller";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* worker线程实例
|
|
|
|
*/
|
|
|
|
export abstract class WorkerThreadWorker {
|
|
|
|
/**
|
|
|
|
* Worker 线程通信控制器
|
|
|
|
*/
|
|
|
|
protected controller: WorkerThreadController;
|
|
|
|
|
|
|
|
public constructor() {
|
|
|
|
this.controller = new WorkerThreadController();
|
|
|
|
|
|
|
|
this.initActions();
|
|
|
|
}
|
|
|
|
|
|
|
|
protected abstract initActions(): void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 实例化action
|
|
|
|
* @param Action action类
|
|
|
|
*/
|
|
|
|
protected createAction<T extends typeof WorkerBaseAction>(Action: T): InstanceType<T> {
|
|
|
|
return (new Action(this.controller, this)) as InstanceType<T>;
|
|
|
|
}
|
|
|
|
}
|