Re: libseed-list g_async_queue



You might have better luck with the new Gir file 
http://devel.akbkhome.com/seed/GLib-2.0.gir

Which uses the new API
http://devel.akbkhome.com/seed/GLib.AsyncQueue.html

pushing/pulling pointers though is going to be difficult to define an expected behaviour..

We could have some limited support, eg. only supporting gobject types both ways, but Gobject/structs as in arguments.
  convert JS -> void* 
    ==> wrapped Gobject/struct => pointer (this has some partial support now)
  convert void* -> JS
    ==> only support Gobject types (this is not supported at present)

That way GString could be used to send data as raw data.
and GValues could be used to store/retrieve JS data..

Regards
Alan


 --- On 24/Jun/2010, Jonatan Liljedahl wrote: 
> I'd like to use a GAsyncQueue to communicate between threads, but:
> 
>  > a = new GLib.AsyncQueue
> 
> ** (seed:2468): CRITICAL **: Struct/union of type: AsyncQueue has size 0 
> in introspection data. Please check GIR
> Segmentation fault
> 
> Trying the other way:
> 
>  > a = GLib.async_queue_new()
> [object seed_struct]
>  > GLib.async_queue_push(a,"hejsan")
>  > GLib.async_queue_length(a)
> 1
>  > GLib.async_queue_push(a,"hejsan")
>  > x=GLib.async_queue_pop(a)
>  > typeof x
> undefined
>  > GLib.async_queue_length(a)
> 0
>  >
> 
> How can I get it to work?
> 
> It's a bit frustrating that the GLib/GObject bridge is only working for 
> some stuff, and other times it requires a bit of guessing to figure out 
> how to use them (like functions returning things to a pointer supplied 
> as an arg, etc..)
> 
> /Jonatan
> 
> _______________________________________________
> libseed-list mailing list
> libseed-list gnome org
> http://mail.gnome.org/mailman/listinfo/libseed-list



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