/* The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all.  */
void g_output_stream_close_async(GOutputStream *stream, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
/* The asyncronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all.  */
void g_output_stream_close_async(GOutputStream *stream, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
{
  GTask *task;
  GError *error = NULL;
  g_return_if_fail (G_IS_OUTPUT_STREAM (stream));
  task = g_task_new (stream, cancellable, callback, user_data);
  g_task_set_source_tag (task, g_output_stream_close_async);
  g_task_set_priority (task, io_priority);
  if (!g_output_stream_set_pending (stream, &error))
    {
      g_task_return_error (task, error);
      g_object_unref (task);
      return;
    }
  g_output_stream_internal_close_async (stream, io_priority, cancellable,
                                        real_close_async_cb, task);
}