中国优质的IT技术网站
专业IT技术创作平台
IT职业在线教育平台
如何加载其他module下的Worker?
微信扫码分享
import worker from '@ohos.worker'; // worker线程文件所在路径:"entry/src/main/ets/workers/worker.ets" const workerStage1: worker.ThreadWorker = new worker.ThreadWorker('entry/ets/workers/worker.ets'); // worker线程文件所在路径:"phone/src/main/ets/ThreadFile/workers/worker.ets" const workerStage2: worker.ThreadWorker = new worker.ThreadWorker('phone/ets/ThreadFile/workers/worker.ets');