Login  Register

Re: Concurrency Pattern - Delete an object if a collction it contains is empty, how ?

Posted by GLASS mailing list on Feb 27, 2019; 2:59pm
URL: https://forum.world.st/Concurrency-Pattern-Delete-an-object-if-a-collction-it-contains-is-empty-how-tp5096082p5096090.html

In order to better understand the situation, I have two questions:
(1) Why do you want to remove an empty Set from an object?
(2) Why not use locks?

James

On Feb 27, 2019, at 4:16 AM, Marten Feldtmann via Glass <[hidden email]> wrote:

This seems to be a general concurrency handling pattern in Gemstone:


Situation: I have an object, which holds a Set in one of its attributes (slots).

Question: I want to remove this object, IF the set is empty. But what happens, if another task is just adding an item to this set ? How can Gemstone find a commit conflict ? I do not want to use locks on objects.


Any other idea ?

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass