Re: g_io_scheduler_job_send_to_mainloop How to?



Hi,

the code you posted looks a little incomplete, but nevertheless I think
you got it a little backwards. From what I see, it should look more or
less like this (note: I didn't actually try to compile this):

gboolean
build_thumbnails (gpointer user_data)
{
  printf ("BUILD!");
}

gboolean
job_func (GIOSchedulerJob *job,
          GCancellable    *cancellable,
          gpointer         user_data)
{
  g_io_scheduler_job_send_to_mainloop (job,
                                       build_thumbnails,
                                       user_data,
                                       NULL);
}

void
loading ()
{
  g_io_scheduler_push_job (job_func,
                           (gpointer)params,
                           free_params,
                           G_PRIORITY_DEFAULT,
                           NULL);
}

---
Florian


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]