Home
last modified time | relevance | path

Searched refs:worker (Results 1 – 25 of 535) sorted by relevance

12345678910>>...22

/third_party/glib/gio/
Dgdbusprivate.c63 static void schedule_pending_close (GDBusWorker *worker);
403 static void _g_dbus_worker_unref (GDBusWorker *worker);
422 GDBusWorker *worker);
428 GDBusWorker *worker; member
436 _g_dbus_worker_unref (close_data->worker); in close_data_free()
443 _g_dbus_worker_ref (GDBusWorker *worker) in _g_dbus_worker_ref() argument
445 g_atomic_int_inc (&worker->ref_count); in _g_dbus_worker_ref()
446 return worker; in _g_dbus_worker_ref()
450 _g_dbus_worker_unref (GDBusWorker *worker) in _g_dbus_worker_unref() argument
452 if (g_atomic_int_dec_and_test (&worker->ref_count)) in _g_dbus_worker_unref()
[all …]
/third_party/node/lib/internal/cluster/
Dmaster.js96 for (const worker of ObjectValues(cluster.workers)) {
97 if (worker.state === 'online' || worker.state === 'listening') {
98 process._debugProcess(worker.process.pid);
100 worker.once('online', function() {
153 function removeWorker(worker) { argument
154 assert(worker);
155 delete cluster.workers[worker.id];
163 function removeHandlesForWorker(worker) { argument
164 assert(worker);
167 if (handle.remove(worker))
[all …]
Dround_robin_handle.js46 RoundRobinHandle.prototype.add = function(worker, send) { argument
47 assert(this.all.has(worker.id) === false);
48 this.all.set(worker.id, worker);
60 this.handoff(worker); // In case there are connections pending.
73 RoundRobinHandle.prototype.remove = function(worker) { argument
74 const existed = this.all.delete(worker.id);
79 this.free.delete(worker.id);
99 const { 0: workerId, 1: worker } = workerEntry;
101 this.handoff(worker);
105 RoundRobinHandle.prototype.handoff = function(worker) { argument
[all …]
/third_party/skia/third_party/externals/libwebp/src/utils/
Dthread_utils.c205 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, WebPWorkerStatus new_status) { in ChangeState() argument
235 WebPWorkerImpl* const impl = (WebPWorkerImpl*)worker->impl_; in ChangeState()
239 if (worker->status_ >= OK) { in ChangeState()
[all …]
/third_party/flutter/skia/third_party/externals/libwebp/src/utils/
Dthread_utils.c205 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, WebPWorkerStatus new_status) { in ChangeState() argument
235 WebPWorkerImpl* const impl = (WebPWorkerImpl*)worker->impl_; in ChangeState()
239 if (worker->status_ >= OK) { in ChangeState()
[all …]
/third_party/node/test/parallel/
Dtest-cluster-worker-disconnect.js33 cluster.worker.on('disconnect', common.mustCall(() => {
45 worker: { property
56 const worker = cluster.fork(); constant
59 worker.once('listening', common.mustCall(() => {
60 const w = worker.disconnect();
61 assert.strictEqual(worker, w, `${worker.id} did not return a reference`);
73 worker.once('disconnect', common.mustCall(() => {
74 checks.worker.emitDisconnect = true;
75 checks.worker.voluntaryMode = worker.exitedAfterDisconnect;
76 checks.worker.state = worker.state;
[all …]
Dtest-cluster-worker-constructor.js29 let worker; variable
31 worker = new cluster.Worker(); variable
32 assert.strictEqual(worker.exitedAfterDisconnect, undefined);
33 assert.strictEqual(worker.state, 'none');
34 assert.strictEqual(worker.id, 0);
35 assert.strictEqual(worker.process, undefined);
37 worker = new cluster.Worker({ variable
42 assert.strictEqual(worker.exitedAfterDisconnect, undefined);
43 assert.strictEqual(worker.state, 'online');
44 assert.strictEqual(worker.id, 3);
[all …]
Dtest-cluster-concurrent-disconnect.js16 const worker = cluster.fork(); constant
17 workers[i] = worker;
18 worker.once('online', common.mustCall(() => {
20 for (const worker of workers)
21 if (worker.isConnected())
22 worker.send(i % 2 ? 'disconnect' : 'destroy');
27 worker.on('error', (err) => {
32 worker.once('disconnect', common.mustCall(() => {
33 for (const worker of workers)
34 if (worker.isConnected())
[all …]
Dtest-cluster-basic.js59 worker: { property
79 const stateNames = Object.keys(checks.worker.states);
91 checks.cluster.equal[name] = worker === arguments[0];
95 checks.worker.states[state] = (state === worker.state);
101 worker.kill();
108 const worker = cluster.fork(); constant
109 assert.strictEqual(worker.id, 1);
110 assert(worker instanceof cluster.Worker,
114 forEach(checks.worker.events, function(bool, name, index) {
115 worker.on(name, common.mustCall(function() {
[all …]
Dtest-cluster-worker-isconnected.js7 const worker = cluster.fork(); constant
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.process.on('disconnect', common.mustCall(assertNotConnected));
Dtest-cluster-worker-destroy.js39 [worker1, worker2].forEach(function(worker) { argument
40 worker.on('disconnect', common.mustCall());
41 worker.on('exit', common.mustCall());
43 } else if (cluster.worker.id === 1) {
45 cluster.worker.process.on('disconnect', function() {
46 cluster.worker.destroy();
49 const w = cluster.worker.disconnect();
50 assert.strictEqual(w, cluster.worker);
53 cluster.worker.destroy();
Dtest-cluster-worker-kill.js68 const worker = cluster.fork(); constant
71 worker.once('listening', common.mustCall(() => {
72 worker.process.kill(KILL_SIGNAL);
80 cluster.on('exit', common.mustCall((worker) => {
81 results.cluster_exitCode = worker.process.exitCode;
82 results.cluster_signalCode = worker.process.signalCode;
87 worker.on('disconnect', common.mustCall(() => {
89 results.worker_exitedAfter = worker.exitedAfterDisconnect;
90 results.worker_state = worker.state;
94 worker.once('exit', common.mustCall((exitCode, signalCode) => {
[all …]
/third_party/skia/third_party/externals/freetype/src/sdf/
Dftbsdf.c570 bsdf_approximate_edge( BSDF_Worker* worker ) in bsdf_approximate_edge() argument
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->distance_map + index, in bsdf_approximate_edge()
594 worker->width, in bsdf_approximate_edge()
595 worker->rows ) ) in bsdf_approximate_edge()
600 worker->width, in bsdf_approximate_edge()
[all …]
/third_party/grpc/src/core/lib/iomgr/
Dpollset_windows.cc51 static void remove_worker(grpc_pollset_worker* worker, in remove_worker() argument
53 worker->links[type].prev->links[type].next = worker->links[type].next; in remove_worker()
54 worker->links[type].next->links[type].prev = worker->links[type].prev; in remove_worker()
55 worker->links[type].next = worker->links[type].prev = worker; in remove_worker()
76 grpc_pollset_worker* worker) { in push_front_worker() argument
77 worker->links[type].prev = root; in push_front_worker()
78 worker->links[type].next = worker->links[type].prev->links[type].next; in push_front_worker()
79 worker->links[type].prev->links[type].next = in push_front_worker()
80 worker->links[type].next->links[type].prev = worker; in push_front_worker()
112 grpc_pollset_worker worker; in pollset_work() local
[all …]
Dev_epoll1_linux.cc193 #define SET_KICK_STATE(worker, kick_state) \ argument
195 (worker)->state = (kick_state); \
196 (worker)->kick_state_mutator = __LINE__; \
477 static bool worker_insert(grpc_pollset* pollset, grpc_pollset_worker* worker) { in worker_insert() argument
479 pollset->root_worker = worker; in worker_insert()
480 worker->next = worker->prev = worker; in worker_insert()
483 worker->next = pollset->root_worker; in worker_insert()
484 worker->prev = worker->next->prev; in worker_insert()
485 worker->next->prev = worker; in worker_insert()
486 worker->prev->next = worker; in worker_insert()
[all …]
/third_party/node/doc/api/
Dcluster.md29 cluster.on('exit', (worker, code, signal) => {
30 console.log(`worker ${worker.process.pid} died`);
55 On Windows, it is not yet possible to set up a named pipe server in a worker.
61 The worker processes are spawned using the [`child_process.fork()`][] method,
72 overloading a worker process.
86 Node.js process and a cluster worker differs:
90 handle passed to the worker, rather than listening to the worker's
93 the worker to use the supplied handle, rather than talk to the master
96 random port. However, in a cluster, each worker will receive the
99 on a unique port, generate a port number based on the cluster worker ID.
[all …]
/third_party/eudev/src/udev/
Dudevd.c91 struct worker *worker; member
118 struct worker { struct
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->pid)); in worker_free()
151 udev_monitor_unref(worker->monitor); in worker_free()
152 udev_unref(worker->udev); in worker_free()
153 event_free(worker->event); in worker_free()
[all …]
/third_party/mindspore/mindspore/core/mindrt/src/thread/
Dthreadpool.cc133 for (auto &worker : workers_) { in ~ThreadPool() local
134 delete worker; in ~ThreadPool()
135 worker = nullptr; in ~ThreadPool()
153 auto worker = new (std::nothrow) Worker(); in CreateThreads() local
154 THREAD_ERROR_IF_NULL(worker); in CreateThreads()
161 worker->set_mask(mask); in CreateThreads()
163 worker->CreateThread(); in CreateThreads()
164 workers_.push_back(worker); in CreateThreads()
257 for (const auto &worker : assigned) { in CalculateScales() local
258 THREAD_RETURN_IF_NULL(worker); in CalculateScales()
[all …]
/third_party/boost/libs/fiber/doc/
Dworker.qbk8 [#worker]
9 [section:worker Running with worker threads]
13 If a worker thread is used but no fiber is created or parts of the framework
16 auto worker = std::thread(
20 worker.join();
24 If the worker thread simply returns, destroys the scheduler and terminates.
26 auto worker = std::thread(
31 worker.join();
34 In order to keep the worker thread running, the fiber associated with the thread
38 fibers of the worker thread have been terminated.
[all …]
/third_party/node/test/internet/
Dtest-dgram-broadcast-multi-process.js81 const worker = fork(process.argv[1], ['child']);
82 workers[worker.pid] = worker;
84 worker.messagesReceived = [];
87 worker.on('exit', (code, signal) => {
91 if (worker.isDone || code === 0) {
97 worker.pid,
113 worker.on('message', (msg) => {
122 worker.messagesReceived.push(msg.message);
124 if (worker.messagesReceived.length === messages.length) {
126 worker.isDone = true;
[all …]
Dtest-dgram-multicast-multi-process.js46 const worker = fork(__filename, ['child']);
47 workers[worker.pid] = worker;
49 worker.messagesReceived = [];
52 worker.on('exit', function(code) {
55 if (worker.isDone || code === 0) {
61 worker.pid,
72 worker.on('message', function(msg) {
83 worker.messagesReceived.push(msg.message);
85 if (worker.messagesReceived.length === messages.length) {
87 worker.isDone = true;
[all …]
Dtest-dgram-multicast-set-interface-lo.js112 const worker = fork(process.argv[1], constant
118 workers[worker.pid] = worker;
120 worker.messagesReceived = [];
121 worker.messagesNeeded = messagesNeeded;
124 worker.on('exit', (code) => {
127 if (worker.isDone || code === 0) {
133 worker.pid,
147 worker.on('message', (msg) => {
156 worker.messagesReceived.push(msg.message);
158 if (worker.messagesReceived.length === worker.messagesNeeded.length) {
[all …]
/third_party/nghttp2/src/
Dh2load.cc170 client->worker->free_client(client); in writecb()
178 client->worker->free_client(client); in writecb()
192 client->worker->free_client(client); in readcb()
204 auto worker = static_cast<Worker *>(w->data); in rate_period_timeout_w_cb() local
205 auto nclients_per_second = worker->rate; in rate_period_timeout_w_cb()
206 auto conns_remaining = worker->nclients - worker->nconns_made; in rate_period_timeout_w_cb()
210 auto req_todo = worker->nreqs_per_client; in rate_period_timeout_w_cb()
211 if (worker->nreqs_rem > 0) { in rate_period_timeout_w_cb()
213 --worker->nreqs_rem; in rate_period_timeout_w_cb()
216 std::make_unique<Client>(worker->next_client_id++, worker, req_todo); in rate_period_timeout_w_cb()
[all …]
/third_party/libuv/docs/code/multi-echo-server/
Dmain.c42 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()
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->options.file = args[0]; in setup_workers()
90 worker->options.args = args; in setup_workers()
[all …]
/third_party/ltp/testcases/kernel/io/direct_io/
Ddma_thread_diotest.c155 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()
177 worker->worker_number, strerror(errno)); in worker_thread()
261 worker[j].fd = SAFE_OPEN(cleanup, filename, in dma_thread_diotest_verify()
263 worker[j].pattern = n; in dma_thread_diotest_verify()
[all …]

12345678910>>...22