diff --git a/coio_glib.c b/coio_glib.c index 7a0d2ec..6bc8905 100644 --- a/coio_glib.c +++ b/coio_glib.c @@ -138,7 +138,7 @@ gboolean coio_task_wakeup_helper(gpointer task) void coio_gasyncresult_wakeup_helper(GObject *source_object, GAsyncResult *res, gpointer user_data) { (void)source_object; - CoioGAsyncResultHelper* helper = (CoioGAsyncResultHelper*)user_data; - helper->res = g_object_ref(res); - coio_ready(helper->task); + CoioChannel* ch = (CoioChannel*)user_data; + + coio_channbsendp(ch, g_object_ref(res)); } diff --git a/coio_glib.h b/coio_glib.h index 8cc7f3e..66ae894 100644 --- a/coio_glib.h +++ b/coio_glib.h @@ -21,11 +21,6 @@ #include #include "coio.h" -typedef struct async_helper { - CoioTask* task; - GAsyncResult* res; -} CoioGAsyncResultHelper; - GSource* coio_gsource_create(); gboolean coio_task_wakeup_helper(gpointer task); void coio_gasyncresult_wakeup_helper(GObject *source_object, GAsyncResult *res, gpointer user_data);