I
Iñaki Baz Castillo
Hi, I can't understand why I can't return the current "Threads.list" array =
in=20
a DRb server method.
=2D In the DRb server object I just do:
def current_threads
Thread.list
end
=2D And the DRb client calls:
drb_client.current_threads
but instead of an Array object I get a DRb:RbObject, and in each call to=
=20
this method I get a different "id":
irb> drb_client.current_threads
=3D> #<DRb:RbObject:0xb7b8d384 @ref=3D-608642478, @uri=3D"druby://0.0.0.0=
:10001">
irb> drb_client.current_threads
=3D> #<DRb:RbObject:0xb7b8b675 @ref=3D-608644410, @uri=3D"druby://0.0.0.0=
:10001">
Of course, I'm 100% sure that "Thread.list" returns an Array. If I return a=
ny=20
other Array all works ok:
=2D DRb server:
def current_threads
[1,2,3,4,5]
end
irb> drb_client.current_threads
[1,2,3,4,5]
Why does this issue occur when returning "Thread.list"?
Thanks for any help.
=2D-=20
I=C3=B1aki Baz Castillo
in=20
a DRb server method.
=2D In the DRb server object I just do:
def current_threads
Thread.list
end
=2D And the DRb client calls:
drb_client.current_threads
but instead of an Array object I get a DRb:RbObject, and in each call to=
=20
this method I get a different "id":
irb> drb_client.current_threads
=3D> #<DRb:RbObject:0xb7b8d384 @ref=3D-608642478, @uri=3D"druby://0.0.0.0=
:10001">
irb> drb_client.current_threads
=3D> #<DRb:RbObject:0xb7b8b675 @ref=3D-608644410, @uri=3D"druby://0.0.0.0=
:10001">
Of course, I'm 100% sure that "Thread.list" returns an Array. If I return a=
ny=20
other Array all works ok:
=2D DRb server:
def current_threads
[1,2,3,4,5]
end
irb> drb_client.current_threads
[1,2,3,4,5]
Why does this issue occur when returning "Thread.list"?
Thanks for any help.
=2D-=20
I=C3=B1aki Baz Castillo