/third_party/node/lib/internal/cluster/ |
H A D | primary.js | 24 const Worker = require('internal/cluster/worker'); 99 for (const worker of ObjectValues(cluster.workers)) { 100 if (worker.state === 'online' || worker.state === 'listening') { 101 process._debugProcess(worker.process.pid); 103 worker.once('online', function() { 142 function removeWorker(worker) { 143 assert(worker); 144 delete cluster.workers[worker.id]; 152 function removeHandlesForWorker(worker) { [all...] |
H A D | round_robin_handle.js | 51 RoundRobinHandle.prototype.add = function(worker, send) { 52 assert(this.all.has(worker.id) === false); 53 this.all.set(worker.id, worker); 65 this.handoff(worker); // In case there are connections pending. 78 RoundRobinHandle.prototype.remove = function(worker) { 79 const existed = this.all.delete(worker.id); 84 this.free.delete(worker.id); 110 const { 0: workerId, 1: worker } = workerEntry; 112 this.handoff(worker); [all...] |
H A D | shared_handle.js | 27 SharedHandle.prototype.add = function(worker, send) { 28 assert(!this.workers.has(worker.id)); 29 this.workers.set(worker.id, worker); 33 SharedHandle.prototype.remove = function(worker) { 34 if (!this.workers.has(worker.id)) 37 this.workers.delete(worker.id);
|
/third_party/skia/third_party/externals/libwebp/src/utils/ |
H A D | thread_utils.c | 10 // Multi-threaded worker 205 WebPWorker* const worker = (WebPWorker*)ptr; in ThreadLoop() local 206 WebPWorkerImpl* const impl = (WebPWorkerImpl*)worker->impl_; in ThreadLoop() 210 while (worker->status_ == OK) { // wait in idling mode in ThreadLoop() 213 if (worker->status_ == WORK) { in ThreadLoop() 214 WebPGetWorkerInterface()->Execute(worker); in ThreadLoop() 215 worker->status_ = OK; in ThreadLoop() 216 } else if (worker->status_ == NOT_OK) { // finish the worker in ThreadLoop() 231 static void ChangeState(WebPWorker* const worker, WebPWorkerStatu argument 263 Init(WebPWorker* const worker) Init() argument 268 Sync(WebPWorker* const worker) Sync() argument 276 Reset(WebPWorker* const worker) Reset() argument 316 Execute(WebPWorker* const worker) Execute() argument 322 Launch(WebPWorker* const worker) Launch() argument 330 End(WebPWorker* const worker) End() argument [all...] |
/third_party/node/test/parallel/ |
H A D | test-cluster-worker-disconnect.js | 33 cluster.worker.on('disconnect', common.mustCall(() => { 45 worker: { 55 // start worker 56 const worker = cluster.fork(); 58 // Disconnect worker when it is ready 59 worker.once('listening', common.mustCall(() => { 60 const w = worker.disconnect(); 61 assert.strictEqual(worker, w, `${worker.id} did not return a reference`); 72 // Check worker event [all...] |
H A D | test-cluster-basic.js | 72 worker: { 92 const stateNames = Object.keys(checks.worker.states); 98 cluster.on(name, common.mustCall(function(/* worker */) { 104 checks.cluster.equal[name] = worker === arguments[0]; 108 checks.worker.states[state] = (state === worker.state); 112 // Kill worker when listening 114 worker.kill(); 117 // Kill process when worker is killed 120 // Create worker [all...] |
H A D | test-cluster-worker-isconnected.js | 7 const worker = cluster.fork(); 9 assert.strictEqual(worker.isConnected(), true); 11 worker.on('disconnect', common.mustCall(() => { 12 assert.strictEqual(worker.isConnected(), false); 15 worker.on('message', function(msg) { 17 worker.disconnect(); 22 assert.strictEqual(cluster.worker.isConnected(), false); 25 assert.strictEqual(cluster.worker.isConnected(), true); 26 cluster.worker.on('disconnect', common.mustCall(assertNotConnected)); 27 cluster.worker [all...] |
H A D | test-cluster-worker-kill.js | 23 // test-cluster-worker-kill.js 27 // - the worker.exitedAfterDisconnect flag, and worker.state are correct 28 // - the worker process actually goes away 50 worker_emitDisconnect: [1, "the worker did not emit 'disconnect'"], 51 worker_emitExit: [1, "the worker did not emit 'exit'"], 52 worker_state: ['disconnected', 'the worker state is incorrect'], 54 worker_died: [true, 'the worker is still running'], 55 worker_exitCode: [null, 'the worker exited w/ incorrect exitCode'], 57 'the worker exite [all...] |
H A D | test-cluster-worker-exit.js | 23 // test-cluster-worker-exit.js 27 // - the worker.exitedAfterDisconnect flag, and worker.state are correct 28 // - the worker process actually goes away 52 worker_emitDisconnect: [1, "the worker did not emit 'disconnect'"], 53 worker_emitExit: [1, "the worker did not emit 'exit'"], 54 worker_state: ['disconnected', 'the worker state is incorrect'], 58 worker_died: [true, 'the worker is still running'], 59 worker_exitCode: [EXIT_CODE, 'the worker exited w/ incorrect exitCode'], 60 worker_signalCode: [null, 'the worker exite [all...] |
H A D | test-worker-debug.js | 14 const workerMessage = 'This is a message from a worker'; 65 const worker = new Worker(__filename, { workerData: id }); 66 workerCallback(worker); 67 worker.on('error', reject); 68 worker.on('exit', resolve); 130 // 2. Run worker. It should break on start. 133 // 5. Console message received, worker runs to a completion. 138 const worker = runWorker(1); 158 await Promise.all([worker, detached, contextEventPromises]); 164 let worker; [all...] |
H A D | test-cluster-kill-disconnect.js | 14 const worker = cluster.fork({ action }); 15 worker.on('disconnect', common.mustCall(() => { 16 assert.strictEqual(worker.exitedAfterDisconnect, true); 19 worker.on('exit', common.mustCall(() => { 20 assert.strictEqual(worker.exitedAfterDisconnect, true); 27 cluster.worker[process.env.action]();
|
/third_party/skia/third_party/externals/freetype/src/sdf/ |
H A D | ftbsdf.c | 558 * worker :: 566 * The function directly manipulates `worker->distance_map`. 570 bsdf_approximate_edge( BSDF_Worker* worker ) in bsdf_approximate_edge() 578 if ( !worker || !worker->distance_map ) in bsdf_approximate_edge() 584 ed = worker->distance_map; in bsdf_approximate_edge() 586 for ( j = 0; j < worker->rows; j++ ) in bsdf_approximate_edge() 588 for ( i = 0; i < worker->width; i++ ) in bsdf_approximate_edge() 590 index = j * worker->width + i; in bsdf_approximate_edge() 592 if ( bsdf_is_edge( worker in bsdf_approximate_edge() 1092 finalize_sdf( BSDF_Worker* worker, const FT_Bitmap* target ) finalize_sdf() argument 1230 BSDF_Worker worker; bsdf_raster_render() local [all...] |
/third_party/ltp/testcases/kernel/fs/read_all/ |
H A D | read_all.c | 17 * The reads are preformed by worker processes which are given file paths by a 24 * number of worker processes is based on the number of available 66 struct worker { struct 90 static struct worker *workers; 211 static void worker_heartbeat(const int worker) in worker_heartbeat() argument 213 tst_atomic_store(atomic_timestamp(), &workers[worker].last_seen); in worker_heartbeat() 216 static int worker_elapsed(const int worker) in worker_elapsed() argument 218 struct worker *const w = workers + worker; in worker_elapsed() 223 static int worker_ttl(const int worker) in worker_ttl() argument 228 read_test(const int worker, const char *const path) read_test() argument 297 worker_run(int worker) worker_run() argument 347 restart_worker(const int worker) restart_worker() argument 428 try_push_work(const int worker, const char *buf) try_push_work() argument 458 push_work(const int worker, const char *buf) push_work() argument [all...] |
/third_party/eudev/src/udev/ |
H A D | udevd.c | 91 struct worker *worker; member 118 struct worker { struct 128 /* passed from worker to main process */ 140 if (event->worker) in event_free() 141 event->worker->event = NULL; in event_free() 146 static void worker_free(struct worker *worker) { in worker_free() argument 147 if (!worker) in worker_free() 150 hashmap_remove(workers, UINT_TO_PTR(worker in worker_free() 159 struct worker *worker; workers_free() local 170 _cleanup_free_ struct worker *worker = NULL; worker_new() local 203 worker_attach_event(struct worker *worker, struct event *event) worker_attach_event() argument 428 struct worker *worker; worker_spawn() local 444 struct worker *worker; event_run() local 503 struct worker *worker; worker_kill() local 629 struct worker *worker; worker_returned() local 933 struct worker *worker; handle_signal() local 1410 struct worker *worker; main() local [all...] |
/third_party/node/test/internet/ |
H A D | test-dgram-broadcast-multi-process.js | 81 const worker = fork(process.argv[1], ['child']); 82 workers[worker.pid] = worker; 84 worker.messagesReceived = []; 87 worker.on('exit', (code, signal) => { 88 // Don't consider this the true death if the worker 91 if (worker.isDone || code === 0) { 97 worker.pid, 113 worker.on('message', (msg) => { 122 worker [all...] |
H A D | test-dgram-multicast-multi-process.js | 46 const worker = fork(__filename, ['child']); 47 workers[worker.pid] = worker; 49 worker.messagesReceived = []; 52 worker.on('exit', function(code) { 53 // Don't consider this the true death if the worker has finished 55 if (worker.isDone || code === 0) { 61 worker.pid, 72 worker.on('message', function(msg) { 83 worker [all...] |
H A D | test-dgram-multicast-ssmv6-multi-process.js | 40 const worker = fork(__filename, ['child']); 41 workers[worker.pid] = worker; 43 worker.messagesReceived = []; 46 worker.on('exit', function(code) { 47 // Don't consider this the true death if the worker has finished 49 if (worker.isDone || code === 0) { 55 worker.pid, 66 worker.on('message', function(msg) { 77 worker [all...] |
H A D | test-dgram-multicast-ssm-multi-process.js | 40 const worker = fork(__filename, ['child']); 41 workers[worker.pid] = worker; 43 worker.messagesReceived = []; 46 worker.on('exit', function(code) { 47 // Don't consider this the true death if the worker has finished 49 if (worker.isDone || code === 0) { 55 worker.pid, 66 worker.on('message', function(msg) { 77 worker [all...] |
H A D | test-dgram-multicast-set-interface-lo.js | 112 const worker = fork(process.argv[1], 118 workers[worker.pid] = worker; 120 worker.messagesReceived = []; 121 worker.messagesNeeded = messagesNeeded; 124 worker.on('exit', (code) => { 125 // Don't consider this a true death if the worker has finished 127 if (worker.isDone || code === 0) { 133 worker.pid, 147 worker [all...] |
/third_party/nghttp2/src/ |
H A D | h2load.cc | 217 client->worker->free_client(client); in writecb() 225 client->worker->free_client(client); in writecb() 239 client->worker->free_client(client); in readcb() 250 auto worker = static_cast<Worker *>(w->data); in rate_period_timeout_w_cb() local 251 auto nclients_per_second = worker->rate; in rate_period_timeout_w_cb() 252 auto conns_remaining = worker->nclients - worker->nconns_made; in rate_period_timeout_w_cb() 256 auto req_todo = worker->nreqs_per_client; in rate_period_timeout_w_cb() 257 if (worker->nreqs_rem > 0) { in rate_period_timeout_w_cb() 259 --worker in rate_period_timeout_w_cb() 292 auto worker = static_cast<Worker *>(w->data); duration_timeout_cb() local 306 auto worker = static_cast<Worker *>(w->data); warmup_timeout_cb() local 453 Client(uint32_t id, Worker *worker, size_t req_todo) Client() argument 3166 auto &worker = workers.back(); main() local [all...] |
/third_party/libuv/docs/code/multi-echo-server/ |
H A D | main.c | 42 struct child_worker *worker = &workers[round_robin_counter]; in on_new_connection() local 43 uv_write2(write_req, (uv_stream_t*) &worker->pipe, &dummy_buf, 1, (uv_stream_t*) client, NULL); in on_new_connection() 54 strcpy(worker_path + (strlen(worker_path) - strlen("multi-echo-server")), "worker"); in setup_workers() 75 struct child_worker *worker = &workers[cpu_count]; in setup_workers() local 76 uv_pipe_init(loop, &worker->pipe, 1); in setup_workers() 80 child_stdio[0].data.stream = (uv_stream_t*) &worker->pipe; in setup_workers() 85 worker->options.stdio = child_stdio; in setup_workers() 86 worker->options.stdio_count = 3; in setup_workers() 88 worker->options.exit_cb = close_process_handle; in setup_workers() 89 worker in setup_workers() [all...] |
/third_party/ltp/testcases/kernel/io/direct_io/ |
H A D | dma_thread_diotest.c | 155 static worker_t *worker; variable 161 worker_t *worker = (worker_t *)arg; in worker_thread() local 162 int offset = worker->offset; in worker_thread() 163 int fd = worker->fd; in worker_thread() 164 unsigned char *buffer = worker->buffer; in worker_thread() 165 int pattern = worker->pattern; in worker_thread() 166 int length = worker->length; in worker_thread() 176 fprintf(stderr, "read failed in worker thread%d: %s", in worker_thread() 177 worker->worker_number, strerror(errno)); in worker_thread() 261 worker[ in dma_thread_diotest_verify() [all...] |
/third_party/node/benchmark/worker/ |
H A D | bench-eventlooputil.js | 32 const worker = new Worker(__filename, { argv: ['idle cats'] }); 34 spinUntilIdle(worker, () => { 37 worker.performance.eventLoopUtilization(); 39 worker.postMessage('bye'); 44 const worker = new Worker(__filename, { argv: ['idle cats'] }); 46 spinUntilIdle(worker, () => { 47 let elu = worker.performance.eventLoopUtilization(); 50 elu = worker.performance.eventLoopUtilization(elu); 52 worker.postMessage('bye');
|
H A D | echo.js | 13 const workerPath = path.resolve(__dirname, '..', 'fixtures', 'echo.worker.js'); 36 const worker = new Worker(workerPath); 37 workerObjs.push(worker); 38 worker.on('online', onOnline); 39 worker.on('message', onMessage); 52 for (const worker of workerObjs) { 53 worker.unref(); 57 for (const worker of workerObjs) { 59 worker.postMessage(payload);
|
/third_party/node/test/known_issues/ |
H A D | test-inspector-cluster-port-clash.js | 8 // `AssertionError [ERR_ASSERTION]: worker 2 failed to bind port` 30 const worker = cluster.fork(); 31 worker.on('error', (err) => assert.fail(err)); 33 worker.on('online', () => { 34 worker.on('message', common.mustCall((message) => { 38 worker.on('exit', common.mustCall((code, signal) => { 40 // worker 2 should fail because of port clash with `server` 42 return assert.fail(`worker ${worker.id} failed to bind port`); 46 worker [all...] |