Mailing List Archive

calls to gasyncqueue_new fail
I'm trying to get a GTK app I wrote for a regular desktop to run on the
N900.

When I compile the app in the SDK, everything goes fine. When I attempt
to run the app on the phone it aborts after attempting to call
g_async_queue_new(). The call is done 5 lines in to the program and it
works normally on a regular desktop.

Is there something Maemo-specific that I need to do to allow async queues?

Thanks,
Michael
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: calls to gasyncqueue_new fail [ In reply to ]
On 11/25/2011 01:50 AM, Michael Cronenworth wrote:
> Is there something Maemo-specific that I need to do to allow async
> queues?

Apparently, yes.

In order to use GAsyncQueue objects you must call g_threads_init() and
link against gthread-2.0. On desktop distros gthread is included in the
CFLAGS and LIBS of gtk+-2.0 and calling g_threads_init() is not
required. Now my app works just fine on my N900.
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: calls to gasyncqueue_new fail [ In reply to ]
On Sat, 2011-12-03 at 14:14 -0600, Michael Cronenworth wrote:
> > Is there something Maemo-specific that I need to do to allow async
> > queues?
>
> Apparently, yes.
>
> In order to use GAsyncQueue objects you must call g_threads_init()
> and

A recent glib (2.32) release changed how threads are handled, there is
no need to initialize threads anymore. But if you are using an old glib
then threads needs to still be initialized. Not maemo specific.

See
http://developer.gnome.org/glib/2.31/glib-Deprecated-Thread-APIs.html#g-thread-init
https://bugzilla.gnome.org/show_bug.cgi?id=660744

--
Kaj-Michael Lang <milang@tal.org>

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: calls to gasyncqueue_new fail [ In reply to ]
On 12/04/2011 02:41 AM, Kaj-Michael Lang wrote:
> A recent glib (2.32) release changed how threads are handled, there is
> no need to initialize threads anymore. But if you are using an old glib
> then threads needs to still be initialized. Not maemo specific.

I'm not using glib 2.32 on any desktop machine. They are using 2.30 or
older. The oldest version I can remember when I started using
GAsyncQueues in apps was glib 2.20, which is what Maemo 5 is using.
Maemo's version needs the init called. I don't really want to spend time
finding out the raw details on such extremely old libraries.

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers