- data = g_new (CloseAsyncData, 1);
- data->res =
- g_simple_async_result_new (G_OBJECT (stream), callback, user_data,
- g_tcp_connection_close_async);
- if (cancellable)
- data->cancellable = g_object_ref (cancellable);
- else
- data->cancellable = NULL;
+ task = g_task_new (stream, cancellable, callback, user_data);
+ g_task_set_priority (task, io_priority);