=?us-ascii?Q?Re=3A=20Glib=20mutex=20doesn=27t=20work=20on=20Windows?=



One suspicious feature is that his test
case for GMutex starts a thread using the windows API rather than glib's
API.

This is not a problem because glib's API is in this case only a wrapper around Win API. 

That is not of itself an error, but it invites the question
whether, for example, he has called g_thread_init().

Yeah, you're right. I called the test function before calling gtk_init(), which also takes care of the 
g_thread_init().
So I found out, that GStaticMutex actually worked for my test sample program, but didn't work in the 
developed application
as expected. 
After heavy investigation I realized that using mutexes is not a good solution for what I was trying to 
achieve and that the random behaviour was rather a design problem. I used a different way for thread 
synchronization and it works fine.

So thanks everyone for replies.

By the way, what is OP? You sound incredibly formal. I respect it, however. As long as you're polite and 
answer the questions :).

myso


To the OP: you need to provide a complete compilable test case,
including your code in main(), to demonstrate the problem.  You should
be able to do that in no more than 20 lines of code with something as
simple as this.

Chris



_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list






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