[Glass] RcIdentityBag cleanup question

James Foster via Glass glass at lists.gemtalksystems.com
Sun Sep 9 08:35:05 PDT 2018


From https://downloads.gemtalksystems.com/docs/GemStone64/3.4.x/GS64-ProgGuide-3.4/GS64-ProgGuide-3.4.htm: <https://downloads.gemtalksystems.com/docs/GemStone64/3.4.x/GS64-ProgGuide-3.4/GS64-ProgGuide-3.4.htm:>

On Sep 7, 2018, at 10:00 PM, BrunoBB via Glass <glass at lists.gemtalksystems.com> wrote:
> 
> Hi,
> 
RcIdentityBag <> <https://downloads.gemtalksystems.com/docs/GemStone64/3.4.x/GS64-ProgGuide-3.4/4-Collections.htm#pgfId-777736>
 <>The class RcIdentityBag provides much of the same functionality as IdentityBag, but with no conflict for multiple sessions that add objects to the bag, and a single session that removes objects.

Internal implementation <https://downloads.gemtalksystems.com/docs/GemStone64/3.4.x/GS64-ProgGuide-3.4/4-Collections.htm#pgfId-777743>
 <>RcIdentityBag is internally implemented using an Array of IdentityBags. Each session number corresponds to two IdentityBags, one for additions to the RcIdentityBag, and one for removed elements. Each logged-in session only modifies the IdentityBags corresponding to its own session number. Computing the current contents of an RcIdentityBag means combining the add bags, and removing all the remove bags.

 <>Maintenance

 <>The implementation of RcIdentityBag means that reclaiming the storage of objects that have been removed from the bag actually occurs when a session performs later adds or removes, or after that session logs out, another session logs in as that session number and performs adds or removes.

 <>If a session adds a great many objects to the RcIdentityBag, and then does not do any further adds or removes; or if it logs out and the following sessions to use that session number do not perform adds or removes on this bag, then performance can become degraded and otherwise dereferenced objects in the RcIdentityBag cannot be garbage collected.

 <>The message cleanupBag may be sent to the RcIdentityBag to process removals for inactive sessions. This may cause conflicts if a session logs in and adds or removes an object.

> GS: 3.4.1.
> 
> RcIdentityBag class comments:
> ....
> While some cleanup of removed elements is automatic, an RcIdentityBag may
> require periodic manual cleanup. 
> .....
> 
> What cleanup does mean here ?
> 
> Only sending #cleanupBag to the RcIdentityBag instance ?
> 
> regards,
> bruno
> 
> 
> 
> --
> Sent from: http://forum.world.st/GLASS-f1460844.html
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20180909/bc627a20/attachment.html>


More information about the Glass mailing list