mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2024-12-25 19:28:28 +00:00
[adapters] 暂时禁用 useExperimentalWorker
This commit is contained in:
parent
13364c0c62
commit
514e203483
@ -16,14 +16,8 @@ const ipcMain = {
|
|||||||
init(callback) {
|
init(callback) {
|
||||||
this._initCallback = callback;
|
this._initCallback = callback;
|
||||||
|
|
||||||
this.worker = wx.createWorker("workers/index.js", { useExperimentalWorker: true });
|
// NOTE { useExperimentalWorker: true } 会让有状态的 Worker 处理很复杂,暂时不使用
|
||||||
|
this.worker = wx.createWorker("workers/index.js");
|
||||||
this.worker.onProcessKilled(() => {
|
|
||||||
console.warn("worker has been killed");
|
|
||||||
this.worker.terminate();
|
|
||||||
this.worker = null;
|
|
||||||
// TODO 这里还未正确处理,还需要重新 init cacheManager 等等,把这边对属性的修改同步过来
|
|
||||||
});
|
|
||||||
|
|
||||||
this.worker.onMessage(
|
this.worker.onMessage(
|
||||||
CC_WORKER_SCHEDULER
|
CC_WORKER_SCHEDULER
|
||||||
|
Loading…
Reference in New Issue
Block a user