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

Re: signals and threads



Dmitry A. Yanko wrote:
On Mon, Dec 05, 2005 at 01:50:40PM -0500, Tristan Van Berkom wrote:
[...]
My app architecture:

Main:
	g_thread_init();
	gdk_threads_init();
	
Thread_A:
	gtk_init();
	gtk_main();
	
Thread_B:
	g_idle_add(); - create window, set and unset signal handlers
	direct texbuffer manipulation

May I just ask why you think you need to use threads in the first place ?

I create thread B on external event, and need to shutdown it on the user
action. Then my app waits for another external event or many.
BTW, Can i use pthread calls? Or i need to use only glib thread support?

Its better to use the gthread api only; while using pthreads directly might work, it wont be portable & it wont be garaunteed to work properly either.


Cheers, -Tristan


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