"Yohanes Santoso" <ysantoso / jenny-gnome.dyndns.org> wrote in message

> What do you mean by "Does not work"? Can you be more specific?

The second thread does not start till the first thread is done, effectively
defeating the purpose of multi-threading.

>     puts `ping -c 5 localhost` # ping 5 times, then quit.

Yes, I tried that  (on Windows) to get the output shown above, like so:

    puts `ping -n 5 localhost`

> >        t.join
>
>     I removed this line because it may not be what you want.

Sorry, my mistake ! It was commented out in my original original code for
the same reasons you mentioned ... just forgot to take it out.

> So, what exactly are you trying to accomplish?

Thanks for showing interest. This is what I want to accomplish:

I have a requestor application which will generate work requests which take
considerable time (even hours !) to complete.  The drb server that I am
trying to write (whose first draft you have seen) should accept these work
request and dispatch them to the least busy machine for execution (all
machines are Windows based). Mean while, the requestor may do other things
and at regular intervals check (poll) for its work status. While doing those
"other things" the requestor may abort (user may kill the process). In which
case I want the drb server (dispatcher) to recognize that fact (hey, that
guy has not polled for his work request, so must no longer be interested)
and kill the appropriate work thread. The client code you have seen is just
a dummy code I am using to simulate the scenario and get a feel for the
whole thing.

Hope this is clear enough. If not please let me know ...

Thanks again.

-- shanko