mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-29 04:14:11 +02:00
Make GIOSchedulerJobFunc return boolean Keep calling io jobs until they
2008-01-25 Matthias Clasen <mclasen@redhat.com> * gioscheduler.h: Make GIOSchedulerJobFunc return boolean * gioscheduler.c: Keep calling io jobs until they return FALSE; this allows big jobs to be executed in chunks, instead of blocking the main loop for a long time. * gsimpleasyncresult.c: * giofile.c: Adapt callers. svn path=/trunk/; revision=6375
This commit is contained in:
committed by
Matthias Clasen
parent
06d957d95d
commit
8228f7f94b
@@ -595,10 +595,10 @@ typedef struct {
|
||||
GSimpleAsyncThreadFunc func;
|
||||
} RunInThreadData;
|
||||
|
||||
static void
|
||||
run_in_thread (GIOSchedulerJob *job,
|
||||
GCancellable *c,
|
||||
gpointer _data)
|
||||
static gboolean
|
||||
run_in_thread (GIOSchedulerJob *job,
|
||||
GCancellable *c,
|
||||
gpointer _data)
|
||||
{
|
||||
RunInThreadData *data = _data;
|
||||
GSimpleAsyncResult *simple = data->simple;
|
||||
@@ -617,6 +617,8 @@ run_in_thread (GIOSchedulerJob *job,
|
||||
g_simple_async_result_complete_in_idle (data->simple);
|
||||
g_object_unref (data->simple);
|
||||
g_free (data);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user