Re: [gtk-list] g_thread help



Hi, 
 
> I would like to write a program with gtk in one thread and most of the
> rest of the code in another.  I can do this using posix threads,
> however, I would like to take advantage of the fact that gtk has been
> ported to Win32 to develop on both platforms.  I had hoped to switch to
> using g_threads, but I seem to be missing something basic.  I cannot
> find a g_thread_new function, or anything similar to actually start a
> new thread going!  Am I not looking at the right header file, or can I
> not do this?  Any help would be appreciated.

functions like g_thread_new, g_thread_self etc. are not implemented yet,
they might be in 1.3 lateron. Until then do the following:

#ifndef G_THREADS_IMPL_POSIX
#error can only work with posix threads so far.
#endif

Then simply use the posix thread functions. This will work on posix
platforms and on windows too, beacuse Tor is using a posix emultaion
library for now, IIRC.

Bye,
Sebastian

-- 
Sebastian Wilhelmi                   |            här ovanför alla molnen
mailto:wilhelmi@ira.uka.de           |      är himmlen så förunerligt blå
http://goethe.ira.uka.de/~wilhelmi   |



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