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

Re: signals and threads



On Mon, Dec 05, 2005 at 12:20:01PM -0500, Tristan Van Berkom wrote:
> >Output:
> >tid: 0x8003 app->text_buffer_my: 0xb661ec18
> >tid: 0x4002 app->text_buffer_my: 0xb6627e40
> >...
> >0x4002's "insert-text" with 0x4002 signal handler(to access thread specific
> >data and handle input properly). How can i resolve a problem?
> I'm quite sure that running two gtk_main() functions
> in the same program will undoubtedly result in good ol'
> undefined behaviour ;) (that is, if you ever got it
> to run in the first place)
M-m-m-m. I'm really run two gtk_main()... :)
But how?..
I just create a mutex for gtk_main(), so gtk_main() runs once. Nothing
changed.
Yes, both windows appears, but problem still at place.
Should i use gtk_init() twice?
What is a best way to do such things? Threads count may to be from 1 to many
:).

> A signal handler runs sychronously where the event
> happens; i.e. the widget that fires "insert-text" will
> call g_signal_emit() and when that returns; all
> handlers will have been called.
But why signal handler for 0xb661ec18, takes input for 0xb6627e40?
I mean, than i don't lost input.
How to handle properly a chain of signal handlers?
What i need to do in 1st thread to make 2nd handler running?





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