celluloid/celluloid — pull request #161 by pberndt (2013-02-03 15:16:12+00:00)
Title: do not call actor for inspect and hash identity

Hello Tony,

thanks a lot for celluloid and celluloid-io!

I am currently using it for developing a benchmarking framework. For this I needed to make a couple of changes. While debugging my application I ran into problems where inspecting the actor proxies created infinite loops until I commented out the call to the actor in ActorProxy#inspect and only show information local to the proxy. At this, I also found it insightful while debugging to see my object is actually an ActorProxy, not an actor.

In a similar vein, I found it practical to be able to put actor proxies into a Hash. For this to work in the case where actors may die, the identity information should not be queried from the actors. Using local information is also much faster, especially when the actors are busy. This also enables me to see in trap_exit which particular actor died more than just its class.

Best regards,
Philipp