Home » Community » Coffee corner » Sharing and Locking
Re: Sharing and Locking [message #25831 is a reply to message #25824] |
Sun, 14 March 2010 18:58   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
gridem wrote on Sun, 14 March 2010 08:37 | The above approach has objects on the heap instead of stack but it has predictable object lifetime. I think that it's the reasonable overhead to solve the considered race condition in case of object destroying.
Mirek, what do you think?
|
I am still not quite sure what you are trying to solve:)
What I think you are trying to do is to avoid dangling pointer. Anyway, making pointer itself dangling helps only a bit and perhaps is not a good strategy: Pointer itself can still exist, but the state of object can be "destroyed". So it may seal some references to it, but IMO is not a good way.
Now maybe my experiences are not wide enough, but I belive that so far, I had little problems with race conditions of this kind in MT code. I guess, usually the best is to make things simple and not get involved into any shared ownership, which after all is the cornerstone of U++ design.
|
|
|
 |
|
Sharing and Locking
By: gridem on Sun, 07 March 2010 09:27
|
 |
|
Re: Sharing and Locking
By: mirek on Sun, 07 March 2010 14:40
|
 |
|
Re: Sharing and Locking
By: gridem on Sun, 07 March 2010 16:38
|
 |
|
Re: Sharing and Locking
By: mirek on Mon, 08 March 2010 01:42
|
 |
|
Re: Sharing and Locking
By: gridem on Mon, 08 March 2010 10:57
|
 |
|
Re: Sharing and Locking
By: gridem on Sun, 14 March 2010 13:37
|
 |
|
Re: Sharing and Locking
By: mirek on Sun, 14 March 2010 18:58
|
 |
|
Re: Sharing and Locking
By: gridem on Mon, 15 March 2010 21:26
|
 |
|
Re: Sharing and Locking
By: mirek on Tue, 16 March 2010 06:02
|
 |
|
Re: Sharing and Locking
By: gridem on Tue, 16 March 2010 08:04
|
 |
|
Re: Sharing and Locking
By: mirek on Tue, 16 March 2010 23:50
|
 |
|
Re: Sharing and Locking
By: gridem on Fri, 19 March 2010 07:44
|
 |
|
Re: Sharing and Locking
By: mirek on Fri, 19 March 2010 07:59
|
 |
|
Re: Sharing and Locking
By: gridem on Sat, 20 March 2010 10:21
|
 |
|
Re: Sharing and Locking
By: mirek on Sun, 21 March 2010 07:37
|
 |
|
Re: Sharing and Locking
By: gridem on Sun, 21 March 2010 11:39
|
 |
|
Re: Sharing and Locking
By: mirek on Sun, 21 March 2010 14:21
|
 |
|
Re: Sharing and Locking
By: gridem on Thu, 01 April 2010 09:14
|
 |
|
Re: Sharing and Locking
By: mirek on Tue, 16 March 2010 06:14
|
Goto Forum:
Current Time: Sun Apr 27 08:15:34 CEST 2025
Total time taken to generate the page: 0.03977 seconds
|