linux vs. win32: gdk_threads_enter behaving different




Could anyone please explain this behaviour:

Imagine a simple window with 1 box and 2 buttons in it. If you press
the first button, the second is destroyed, and a newly created button
packed into the box. This *works* on linux and win32 (gtk+-2.10.13).

Now, let button 1 start a thread which does the same. On linux,
gds_threds_enter is passed, on win32 it blocks forever. (Strange enough,
win32 does not block in case the second button is a label.)

My workaround: The thread itself calls g_idle_add() to do the job.

So, my conclusion: On the contrast to linux, unter win32 there is no way
to use gdk_threads_enter() to synchronize between different threads.

Felix




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