[adapters] 暂时禁用 useExperimentalWorker

This commit is contained in:
SmallMain 2024-10-23 16:10:15 +08:00
parent 13364c0c62
commit 514e203483
No known key found for this signature in database

View File

@ -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