1. It calls DRb.start_service 6 times
2. It calls ARGV.shift 6 times - unless your intention is to have 6
different DRB URLs, so that you are talking to six *diffferent* remote
arrays, and push one item onto each? Then that's something completely
different.
To point out whats in my mind, in the later program I am getting a new
instance of the remote object, so it will not have any resource
conflict.
DRb gives absolutely zero locking. If two clients make concurrent
accesses to the same remote object, then they will cause concurrent
method calls to execute at the server side. Tthat is, your server object
*must* be thread-safe.
It does not matter if you make one local proxy object and invoke it from
six threads, or six separate proxy objects onto the same remote object
invoked from six threads.
DRb is effectively transparent to all this. If your program works
correctly with six local threads accessing a single local object
concurrently, then it will be fine with six threads accessing a single
remote object over DRb.
The second code you put consumes 6 elements from ARGV. You might be
passing the same URL 6 times, or you might be passing 6 different URLs
pointing to 6 different remote objects.