Re: Glib mutex doesn't work on Windows

2010-12-17 Thread Chris Vine
On Fri, 17 Dec 2010 18:30:28 +0100 (CET) Michael T. wrote: > > 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

Re: Glib mutex doesn't work on Windows

2010-12-17 Thread Michael T .
> 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 exampl

Re: Glib mutex doesn't work on Windows

2010-12-16 Thread michael
Hi On 12/16/2010 07:47 PM, Michael T. wrote: Hi, I'm using glib mutexes on Windows and I think they don't work. I tried to use WIN API mutexes instead and they did work. Short sample program: I initialize the WIN API mutex, then create two threads using WIN API with this simple code: DWORD

Re: Glib mutex doesn't work on Windows

2010-12-16 Thread John K. Luebs
Michael T. wrote: Hi, I'm using glib mutexes on Windows and I think they don't work. I tried to use WIN API mutexes instead and they did work. Short sample program: I initialize the WIN API mutex, then create two threads using WIN API with this simple code: DWORD WINAPI MyThreadFunction( LPVO

Re: Glib mutex doesn't work on Windows

2010-12-16 Thread Chris Vine
On Thu, 16 Dec 2010 21:15:36 + Chris Vine wrote: > On Thu, 16 Dec 2010 12:17:51 -0700 > Kevin DeKorte wrote: > [snip] > > I had this problem developing a GTK application on OpenBSD, it seems > > that GMutex's are not guaranteed to be recursive or non-recursive. > > > > I altered my code to

Re: Glib mutex doesn't work on Windows

2010-12-16 Thread Chris Vine
On Thu, 16 Dec 2010 12:17:51 -0700 Kevin DeKorte wrote: [snip] > I had this problem developing a GTK application on OpenBSD, it seems > that GMutex's are not guaranteed to be recursive or non-recursive. > > I altered my code to work with GConditionals and worked fine. Perhaps, > that will work f

Re: Glib mutex doesn't work on Windows

2010-12-16 Thread michael
Hi On 12/16/2010 07:47 PM, Michael T. wrote: Hi, I'm using glib mutexes on Windows and I think they don't work. I tried to use WIN API mutexes instead and they did work. Short sample program: I initialize the WIN API mutex, then create two threads using WIN API with this simple code: DWORD

Re: Glib mutex doesn't work on Windows

2010-12-16 Thread Kevin DeKorte
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/16/2010 11:47 AM, Michael T. wrote: > Hi, > I'm using glib mutexes on Windows and I think they don't work. > I tried to use WIN API mutexes instead and they did work. > > Short sample program: > I initialize the WIN API mutex, then create two t