V
Ville Mattila
Hello,
I'm having a problem with my DRb application. It goes like this:
server A
def foo(match)
@bar.each do |b|
if b == match
return b
end
end
end
client B
[1,2,3].each do |c|
f = DRbObject.new(nil, A)
foo = f.foo
do stuff some time...
foo.inspect # <-- this causes recycled object error"
end
if foo method is changed so that
def foo(match)
@container = Array.new
@bar.each do |b|
if b == match
@container.push(b)
return b
end
end
end
I will no longer get recycled error. But this seems quite bad. I know
have to manually clear @container. Is there way to say Server that this 'b'
is a drb reference do not garbage collect it?
- Ville
I'm having a problem with my DRb application. It goes like this:
server A
def foo(match)
@bar.each do |b|
if b == match
return b
end
end
end
client B
[1,2,3].each do |c|
f = DRbObject.new(nil, A)
foo = f.foo
do stuff some time...
foo.inspect # <-- this causes recycled object error"
end
if foo method is changed so that
def foo(match)
@container = Array.new
@bar.each do |b|
if b == match
@container.push(b)
return b
end
end
end
I will no longer get recycled error. But this seems quite bad. I know
have to manually clear @container. Is there way to say Server that this 'b'
is a drb reference do not garbage collect it?
- Ville