Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

calls to gasyncqueue_new fail

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


mike at cchtml

Nov 24, 2011, 11:50 PM

Post #1 of 4 (325 views)
Permalink
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 [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


mike at cchtml

Dec 3, 2011, 12:14 PM

Post #2 of 4 (294 views)
Permalink
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 [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


milang at tal

Dec 4, 2011, 12:41 AM

Post #3 of 4 (301 views)
Permalink
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 [at] tal>

_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


mike at cchtml

Dec 4, 2011, 12:21 PM

Post #4 of 4 (299 views)
Permalink
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 [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.