Re: Glib::Dispatcher1<T>
- From: Chris Vine <chris cvine freeserve co uk>
- To: gtkmm-list gnome org
- Cc: Daniel Elstner <daniel kitta googlemail com>
- Subject: Re: Glib::Dispatcher1<T>
- Date: Sat, 20 Jan 2007 21:44:03 +0000
On Saturday 20 January 2007 19:57, Daniel Elstner wrote:
[snip]
> By static I meant unchanging over the lifetime of the thread. I know
> that dereferencing is the issue here. But if the data in question was
> only written to before the thread was created, or if you synchronize
> access yourself by other means, it is perfectly safe to dereference.
If it is static in that sense, why send it as an argument at all? If it is an
option though, why not, provided it is documented.
[snip]
> Well until now no-one has complained about the (non-)atomicity of the
> current Dispatcher, and people have at least been compiling it on
> various Unices I have never laid an eye on. The whole issue sounds to
> me like a simple omission in the POSIX standard, due to the relevant
> parts having been written before POSIX threads came into being. Well,
> at least I hope it is that way. Correct me if I'm wrong.
I do not know if you are wrong or if you are right, although I suspect that
you are right. It could make a difference for kernels which implement
processes differently from threads - Solaris does as I understand it, Linux
doesn't. (Note I said "could" not "does": I disclaim knowing the answer.)
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]