Lines Matching refs:worker
1 # @ohos.worker (Starting the Worker) (System API)
3 … thread is referred to as the host thread. The URL file passed in during worker creation is execut…
9 …orker, see [Precautions for Worker](../../arkts-utils/worker-introduction.md#precautions-for-worke…
15 …module. For details about its public APIs, see [@ohos.worker (Starting the Worker)](js-apis-worker…
20 import { worker } from '@kit.ArkTS';
25 The RestrictedWorker class inherits [ThreadWorker<sup>9+</sup>](js-apis-worker.md#threadworker9) an…
45 …tails about the rules, see [Precautions for File URLs](../../arkts-utils/worker-introduction.md#pr…
46 | options | [WorkerOptions](js-apis-worker.md#workeroptions) | No | Options that can be set for …
56 | 10200007 | The worker file patch is invalid path. |
60 …he Worker thread file, see [Precautions for File URLs](../../arkts-utils/worker-introduction.md#pr…
65 import { worker } from '@kit.ArkTS';
69 // Scenario 1: URL of the Worker thread file: "entry/src/main/ets/workers/worker.ets"
70 const workerStageModel01 = new worker.RestrictedWorker('entry/ets/workers/worker.ets', {name:"first…
72 // Scenario 2: URL of the Worker thread file: "phone/src/main/ets/ThreadFile/workers/worker.ets"
73 const workerStageModel02 = new worker.RestrictedWorker('phone/ets/ThreadFile/workers/worker.ets');
78 import { worker, MessageEvents } from '@kit.ArkTS';
80 //import { process } from '@kit.ArkTS'; // Only worker APIs can be imported to the restricted Worke…
82 const workerPort = worker.workerPort;
85 console.info("worker:: This is worker thread.")
86 …// console.info("worker:: worker tid: "+ process.tid) // Run process.tid. The host thread reports …