# IronRuby usage of ConditionalWeakTable

**URL:** <https://www.ruby-forum.com/t/ironruby-usage-of-conditionalweaktable/188162>\
**Category:** IronRuby\
**Created:** [May 6, 2010, 6:46pm UTC](https://www.ruby-forum.com/t/ironruby-usage-of-conditionalweaktable/188162 "2010-05-06T18:46:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodrigo\_Kumpera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ea666f/32.png) [@Rodrigo\_Kumpera](https://www.ruby-forum.com/u/Rodrigo_Kumpera)\
**Post date:** [May 6, 2010, 6:46pm UTC](https://www.ruby-forum.com/t/ironruby-usage-of-conditionalweaktable/188162/1 "2010-05-06T18:46:06Z")

</div>

Hey folks,

I downloaded DLR from [dlr.codeplex.com](http://dlr.codeplex.com) a few days ago and IR was not  
properly using CWT to store properties on CLR objects.

Has this been fixed?

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Kumpera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ea666f/32.png) [@Rodrigo\_Kumpera](https://www.ruby-forum.com/u/Rodrigo_Kumpera)\
**Post date:** [May 6, 2010, 7:21pm UTC](https://www.ruby-forum.com/t/ironruby-usage-of-conditionalweaktable/188162/2 "2010-05-06T19:21:49Z")

</div>

No, IronRuby still uses a custom weak table, which doesn’t work properly  
in all scenarios.

Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Rodrigo  
Kumpera  
Sent: Thursday, May 06, 2010 9:44 AM  
To: removed\_email\_address@domain.invalid  
Subject: [Ironruby-core] IronRuby usage of ConditionalWeakTable

Hey folks,

I downloaded DLR from [dlr.codeplex.com](http://dlr.codeplex.com)[http://dlr.codeplex.com](http://dlr.codeplex.com) a few  
days ago and IR was not properly using CWT to store properties on CLR  
objects.

Has this been fixed?

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Kumpera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ea666f/32.png) [@Rodrigo\_Kumpera](https://www.ruby-forum.com/u/Rodrigo_Kumpera)\
**Post date:** [May 6, 2010, 10:40pm UTC](https://www.ruby-forum.com/t/ironruby-usage-of-conditionalweaktable/188162/3 "2010-05-06T22:40:17Z")

</div>

That’s pretty odd given that there is code to transparently use CWT  
instead  
of Dictionary\<WR, object\>.

I was hoping for to use IR to benchmark my current implementation of CWT  
on  
mono. ☹

On Thu, May 6, 2010 at 2:21 PM, Tomas M.  
\<removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Kumpera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ea666f/32.png) [@Rodrigo\_Kumpera](https://www.ruby-forum.com/u/Rodrigo_Kumpera)\
**Post date:** [May 11, 2010, 5:57am UTC](https://www.ruby-forum.com/t/ironruby-usage-of-conditionalweaktable/188162/4 "2010-05-11T05:57:40Z")

</div>

Don’t rush at finishing it just because of me. Specially because the  
managed  
part of our CWT  
is doing linear search instead of been a hashtable. I’m halfway thru  
implementing it and it would  
be awesome to have it done since most of my tests are artificial.

On Thu, May 6, 2010 at 5:45 PM, Tomas M.  
\<removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Kumpera](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ea666f/32.png) [@Rodrigo\_Kumpera](https://www.ruby-forum.com/u/Rodrigo_Kumpera)\
**Post date:** [May 6, 2010, 10:48pm UTC](https://www.ruby-forum.com/t/ironruby-usage-of-conditionalweaktable/188162/5 "2010-05-06T22:48:29Z")

</div>

Yes, it should be easy to switch over to CWT. I can look at doing so  
tomorrow if it helps you.

Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Rodrigo  
Kumpera  
Sent: Thursday, May 06, 2010 1:34 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] IronRuby usage of ConditionalWeakTable

That’s pretty odd given that there is code to transparently use CWT  
instead of Dictionary\<WR, object\>.

I was hoping for to use IR to benchmark my current implementation of CWT  
on mono. ☹

On Thu, May 6, 2010 at 2:21 PM, Tomas M.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\>  
wrote:  
No, IronRuby still uses a custom weak table, which doesn’t work properly  
in all scenarios.

Tomas

From:  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]  
On Behalf Of Rodrigo Kumpera  
Sent: Thursday, May 06, 2010 9:44 AM  
To: removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: [Ironruby-core] IronRuby usage of ConditionalWeakTable

Hey folks,

I downloaded DLR from [dlr.codeplex.com](http://dlr.codeplex.com)[http://dlr.codeplex.com](http://dlr.codeplex.com) a few  
days ago and IR was not properly using CWT to store properties on CLR  
objects.

Has this been fixed?
