mingw-cross-env-list
[Top][All Lists]
Advanced

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

Re: [Mingw-cross-env-list] MinGW glib threading issues?


From: Matthias Gehre
Subject: Re: [Mingw-cross-env-list] MinGW glib threading issues?
Date: Sun, 20 Nov 2011 14:06:36 +0100

2011/11/19 Dmitry Groshev <address@hidden>:
> Hello!
>
> On 19/11/2011, Matthias Gehre <address@hidden> wrote:
>> I saw that glib is compiled with --disable-threads (in src/glib.mk).
>> Does that mean I cannot use glibs thread/mutex etc primitives?
>> Lightspark depends heavily on those.
>
> Precisely.
> I guess this configuration choice was made because GTK+ cannot use
> threading on Windows anyway - so if Lightspark uses GTK+, and calls
> its functions (and/or GDK functions) from multiple threads, porting it
> will be rather nontrivial. Otherwise (if GLib threading is enough for
> Lightspark) you likely will need to configure GLib with
> "--with-threads=posix".
>
>> I also read that mingw's gcc needs '-mthreads' on every sourcefile if
>> one uses threads. What exactly does that do?
>
> Google could have answered this. ;-)
> "-mthreads
>    Support thread-safe exception handling on Mingw32. Code that
> relies on thread-safe exception handling must compile and link all
> code with the -mthreads option. When compiling, -mthreads defines
> -D_MT; when linking, it links in a special thread helper library
> -lmingwthrd which cleans up per thread exception handling data. "
>
>
> --
> -= With best regards, Dmitry Groshev =-
>

Thanks for that information!
I have converted lightsparks code to only call gtk from within one thread,
and that gets me a big step further.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]