[Glass] RcIdentityBag cleanup question

Smalltalk via Glass glass at lists.gemtalksystems.com
Sun Sep 9 17:39:51 PDT 2018


James,

I should check the manual first :(

Thanks for the confirmation.

regards,
bruno

El 09/09/2018 a las 12:35, James Foster escribió:
> From 
> 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 
> <mailto: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 <mailto:Glass at lists.gemtalksystems.com>
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>



---
El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20180909/9f7ebdbb/attachment.html>


More information about the Glass mailing list