mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 18:52:09 +01:00
GFile: remove some unnecessary code
The "mainloop_barrier" in copy_async_thread() is unnecessary, since the g_simple_async_result_complete_in_idle() will be queued after all of the g_io_scheduler_job_send_to_mainloop_async()s, and sources with the same priority will run in the order in which they were queued. https://bugzilla.gnome.org/show_bug.cgi?id=661767
This commit is contained in:
parent
4749878f91
commit
a98d26c9bb
15
gio/gfile.c
15
gio/gfile.c
@ -5758,15 +5758,6 @@ copy_async_progress_in_main (gpointer user_data)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
mainloop_barrier (gpointer user_data)
|
||||
{
|
||||
/* Does nothing, but ensures all queued idles before
|
||||
this are run */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
copy_async_progress_callback (goffset current_num_bytes,
|
||||
goffset total_num_bytes,
|
||||
@ -5809,12 +5800,6 @@ copy_async_thread (GIOSchedulerJob *job,
|
||||
data,
|
||||
&error);
|
||||
|
||||
/* Ensure all progress callbacks are done running in main thread */
|
||||
if (data->progress_cb != NULL)
|
||||
g_io_scheduler_job_send_to_mainloop (job,
|
||||
mainloop_barrier,
|
||||
NULL, NULL);
|
||||
|
||||
if (!result)
|
||||
g_simple_async_result_take_error (res, error);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user