Home | History | Annotate | Download | only in gio

Lines Matching refs:job

52   GSourceFunc cancel_func; /* Runs under job map lock */
71 g_io_job_free (GIOSchedulerJob *job)
73 if (job->cancellable)
74 g_object_unref (job->cancellable);
75 g_free (job);
125 remove_active_job (GIOSchedulerJob *job)
132 active_jobs = g_slist_delete_link (active_jobs, job->active_link);
158 GIOSchedulerJob *job = data;
160 if (job->destroy_notify)
161 job->destroy_notify (job->data);
163 remove_active_job (job);
164 g_io_job_free (job);
171 GIOSchedulerJob *job = data;
174 if (job->cancellable)
175 g_cancellable_push_current (job->cancellable);
179 result = job->job_func (job, job->cancellable, job->data);
183 if (job->cancellable)
184 g_cancellable_pop_current (job->cancellable);
186 job_destroy (job);
192 GIOSchedulerJob *job = data;
195 if (job->cancellable)
196 g_cancellable_push_current (job->cancellable);
198 result = job->job_func (job, job->cancellable, job->data);
200 if (job->cancellable)
201 g_cancellable_pop_current (job->cancellable);
215 * Schedules the I/O job to run.
218 * regardless whether the job was cancelled or has run to completion.
220 * If @cancellable is not %NULL, it can be used to cancel the I/O job
232 GIOSchedulerJob *job;
236 job = g_new0 (GIOSchedulerJob, 1);
237 job->job_func = job_func;
238 job->data = user_data;
239 job->destroy_notify = notify;
240 job->io_priority = io_priority;
243 job->cancellable = g_object_ref (cancellable);
246 active_jobs = g_slist_prepend (active_jobs, job);
247 job->active_link = active_jobs;
253 g_thread_pool_push (job_thread_pool, job, NULL);
260 job->idle_tag = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE + 1 + io_priority / 10,
262 job, job_destroy);
271 * A job is cancellable if a #GCancellable was passed into
283 GIOSchedulerJob *job = l->data;
284 if (job->cancellable)
286 g_object_ref (job->cancellable));
343 * @job: a #GIOSchedulerJob
348 * Used from an I/O job to send a callback to be run in the
350 * blocking the I/O job).
355 g_io_scheduler_job_send_to_mainloop (GIOSchedulerJob *job,
365 g_return_val_if_fail (job != NULL, FALSE);
368 if (job->idle_tag)
406 * @job: a #GIOSchedulerJob
411 * Used from an I/O job to send a callback to be run asynchronously
413 * main loop is available, but at that time the I/O job might have
422 g_io_scheduler_job_send_to_mainloop_async (GIOSchedulerJob *job,
431 g_return_if_fail (job != NULL);
434 if (job->idle_tag)