Related articles |
---|
Promoting weak pointers m.helvensteijn@gmail.com (Michiel Helvensteijn) (2009-06-11) |
Re: Promoting weak pointers fset.slb@gmail.com (Scott Burson) (2009-06-15) |
Re: Promoting weak pointers andrew@tomazos.com (Andrew Tomazos) (2009-06-16) |
Re: Promoting weak pointers m.helvensteijn@gmail.com (Michiel Helvensteijn) (2009-06-16) |
Re: Promoting weak pointers m.helvensteijn@gmail.com (Michiel Helvensteijn) (2009-06-16) |
Re: Promoting weak pointers m.helvensteijn@gmail.com (Michiel Helvensteijn) (2009-06-17) |
Re: Promoting weak pointers bobduff@shell01.TheWorld.com (Robert A Duff) (2009-06-17) |
Re: Promoting weak pointers andrew@tomazos.com (Andrew Tomazos) (2009-06-18) |
Re: Promoting weak pointers armelasselin@hotmail.com (Armel) (2009-06-19) |
Re: Promoting weak pointers dot@dotat.at (Tony Finch) (2009-06-19) |
From: | Michiel Helvensteijn <m.helvensteijn@gmail.com> |
Newsgroups: | comp.compilers |
Date: | Wed, 17 Jun 2009 05:58:43 -0700 (PDT) |
Organization: | Compilers Central |
References: | 09-06-047 09-06-055 09-06-057 |
Keywords: | linker, parallel |
Posted-Date: | 18 Jun 2009 17:33:49 EDT |
On Jun 16, 3:55 pm, John wrote:
> [Now I'm confused, too. This is an ordinary race condition of the kind
> that every parallel program has to handle, and would present the same
> issues no matter what kind of pointer it is. -John]
Agreed. Andrew simply suggested that one way to avoid the the
destruction of the object (by thread A) between the test and the
access (in thread B) is to first promote the weak pointer in thread B
to temporarily keep the object alive.
It's certainly a way to go. But I believe a locking mechanism
specifically for this purpose would be more elegant. Anyway, it will
be a while before we have to worry about threading. There's still
plenty to do on sequential programming.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.