g_source_remove_unix_fd(&source->gsource, source->tag);
g_source_destroy(&source->gsource);
g_source_unref(&source->gsource);
-
- source->data = NULL;
}
void
if (g_source_is_destroyed(&source->gsource)) {
TPL_WARN("gsource(%p) already has been destroyed.",
source);
- source->data = NULL;
return;
}
}
if (!destroy_in_thread) {
+ if (source->fd_type == FD_TYPE_FENCE &&
+ source->type == SOURCE_TYPE_DISPOSABLE) {
+ TPL_LOG_D("[GSOURCE][DESTROY]", "tpl_gsource(%p) type(%d)",
+ source, source->type);
+
+ g_source_remove_unix_fd(&source->gsource, source->tag);
+ source->data = NULL;
+ g_source_destroy(&source->gsource);
+ g_source_unref(&source->gsource);
+ }
__gsource_remove_and_destroy(source);
}