How to create a new customized GSource



Dear All,

Sorry, I am not sure if I post this question twice in this list. But
it seems the first time was failed.

I have a problem when I create a new GSource structure.

In fact, I would send some events to the main loop of my app from
other threads only with the glib APIs. I create my own GSource
structure and attach it with the default main context. But I always
get a segment fault when the other thread send some thing to the main
loop. I find every few information about using GSource.

Where can I find an example of using GSource (not using
g_idle_source_new, nor g_timeout_source_new) ? or Can you guys suggest
me better solution about send event with my own data to main loop
(main loop can not be stoped or blocked) only using glib APIs?

Thanks in advance!

--
Regards!

Liangjing


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]