drb object client - call and continue?

A

Andy Koch

Hello,

I'm working on a script which calls to a drb object. I'm wondering if
there is a way to invoke the drb process without the caller waiting for
the drb process to complete.

I'll be more descriptive. Here is my code...

##########################################################

DRb.start_service()
obj = DRbObject.new(nil, 'druby://localhost:9000')
args = Hash.new

# run back end processing, and carry on
obj.perforce_this(args)

##########################################################

What I'm hoping to find is a way such that the call
"obj.perforce_this(args)" can occur and the drb server can simply
respond like "message received" allowing the client to go on with it's
business while the server process completes it's new task.

Is this possible? Or do I need to go a different route?

regards,

andy koch
 
A

ara.t.howard

Hello,

I'm working on a script which calls to a drb object. I'm wondering if there
is a way to invoke the drb process without the caller waiting for the drb
process to complete.

I'll be more descriptive. Here is my code...

##########################################################

DRb.start_service()
obj = DRbObject.new(nil, 'druby://localhost:9000')
args = Hash.new

# run back end processing, and carry on
obj.perforce_this(args)

##########################################################

What I'm hoping to find is a way such that the call
"obj.perforce_this(args)" can occur and the drb server can simply respond
like "message received" allowing the client to go on with it's business
while the server process completes it's new task.

Is this possible? Or do I need to go a different route?

regards,

andy koch


background = Thread.new{ drbobject.message }

# ....

background.value # blocks for value

-a
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top