Re: [Vala] GPrivete and GStaticPrivate...and threads with their own data
- From: Mihail Naydenov <mlists ymail com>
- To: vala <vala-list gnome org>
- Subject: Re: [Vala] GPrivete and GStaticPrivate...and threads with their own data
- Date: Sat, 27 Sep 2008 07:39:22 -0700 (PDT)
After same digging I came to this:
http://mail.gnome.org/archives/vala-list/2008-May/msg00144.html
It seams there is no way to pass custom data to new threads, they always operate on the spawning class members.
I do not know much about threading and vala, but that is quite limiting, and even the simplest things (like giving the new thread a unique name) look hard or impossible in my head :/
Even events have both Sender and Event args to represent the context in which they are called...
Please, anyone with vala threading experience, share the typical pattern of using threads,.
Many thanks in advance!
MihailNaydnov
----- Original Message ----
From: Mihail Naydenov <mlists ymail com>
To: Ali Sabil <ali sabil gmail com>
Cc: vala <vala-list gnome org>
Sent: Friday, September 26, 2008 6:51:25 PM
Subject: Re: [Vala] GPrivete and GStaticPrivate
Ok, further with the extreme novice questions, but how can one pass custom(different) data to new threads?!?
Thread.create accepts a ThreadFunc delegate which is to be executed on the new thread. But ThreadFunc has to be function with no params. So in the ThreadFunc one can only access class members and functions of the class, created the thread, but these are all shared between all threads, spawned by that class.
hope Im not missing something obvious...
MihailNajdenov
----- Original Message ----
From: Ali Sabil <ali sabil gmail com>
To: Mihail Naydenov <mlists ymail com>
Sent: Friday, September 26, 2008 4:32:48 PM
Subject: Re: [Vala] GPrivete and GStaticPrivate
Hi,
I never used GPrivate or GStaticPrivate myself, but reading from the documentation they are probably just missing from the glib-2.0.vapi binding.
--
Ali
2008/9/26 Mihail Naydenov
<mlists ymail com> Are there bindings for GStaticPrivate, GPrivete and the *_private_set/get functions?
I was searching through the
glib-2.0.vapi and did not find any.
Are those unnecessary in vala? How can one create and use data, private for a thread?
Im a novice, sorry if the question is lame :/
MihailNajdenov
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]