mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +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
12
gio/gfile.c
12
gio/gfile.c
@@ -4273,8 +4273,8 @@ mainloop_barrier (gpointer user_data)
|
||||
|
||||
|
||||
static void
|
||||
copy_async_progress_callback (goffset current_num_bytes,
|
||||
goffset total_num_bytes,
|
||||
copy_async_progress_callback (goffset current_num_bytes,
|
||||
goffset total_num_bytes,
|
||||
gpointer user_data)
|
||||
{
|
||||
CopyAsyncData *data = user_data;
|
||||
@@ -4291,10 +4291,10 @@ copy_async_progress_callback (goffset current_num_bytes,
|
||||
g_free);
|
||||
}
|
||||
|
||||
static void
|
||||
static gboolean
|
||||
copy_async_thread (GIOSchedulerJob *job,
|
||||
GCancellable *cancellable,
|
||||
gpointer user_data)
|
||||
GCancellable *cancellable,
|
||||
gpointer user_data)
|
||||
{
|
||||
GSimpleAsyncResult *res;
|
||||
CopyAsyncData *data;
|
||||
@@ -4327,6 +4327,8 @@ copy_async_thread (GIOSchedulerJob *job,
|
||||
}
|
||||
|
||||
g_simple_async_result_complete_in_idle (res);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user