From: Christoph Rippel Date: 2001-03-16T17:04:46+09:00 Subject: [ruby-talk:12730] Status of (un)freeze? Hi, I am currently in desperate need for a freeze/unfreeze facility for untangle package which (supposedly) can handle arbitrarily tangled (self-referential) data structures. The general problem is that during transversal of the data structure the participating members of the data-structure might change in a threading environment in effect changing the data structure itself (this unfortunately applies to to un-tangled data structures as well) The ideal solution would to be put a temporary lock (freeze) acquired during the transversal (putting a global thread look does not seem elegant and is probably dangerous) so I thought I ask about current status of #unfreeze. There was a short discussion about this three month ago where Matz mentioned that it is easier to (un)freeze if Ruby would sport two versions of freeze but unfortunately it might also be too confusing to have two versions of freeze around. The must natural thing in the transversal problem would be to use a (hypothetical) Freeze object who can acquire a freezing look of on a arbitrary number of objects with the facility to later relies some or all freezing locks at a later time (an object is in an un-frozen state only if no Freeze object has a lock on it and it is not frozen in the standard sense) - has anybody written a Freeze Class similarly to the above - and/or other thoughts on the problem? Christoph