El Domingo, 29 de Junio de 2008, Iñaki Baz Castillo escribió:

> - In the DRb server object I just do:
>
>   def current_threads
>     Thread.list
>   end
>
> - And the DRb client calls:
>
>   drb_client.current_threads
>
> but instead of an Array object I get a DRb::DRbObject, and in each call to
> this method I get a different "id":
>
> irb> drb_client.current_threads
> => #<DRb::DRbObject:0xb7b8d384 @ref=-608642478,
> @uri="druby://0.0.0.0:10001"> 
> irb> drb_client.current_threads 
> => #<DRb::DRbObject:0xb7b8b675 @ref=-608644410,
> @uri="druby://0.0.0.0:10001">

Opsss, and more extrange:
Note the following:

irb> drb_client.current_threads
=> #<DRb::DRbObject:0xb7b8d384 @ref=-608642478, @uri="druby://0.0.0.0:10001">

irb> puts drb_client.current_threads
#<Thread:0xb7c8f700>
#<Thread:0xb76f9598>
#<Thread:0xb76f9a98>
#<Thread:0xb76f9890>
#<Thread:0xb76f91b0>
=> nil

How is it possible? why "puts" gets this?


irb> puts drb_client.current_threads.class
DRb::DRbObject
=> nil


-- 
Iñaki Baz Castillo