On Fri, Nov 25, 2011 at 3:26 AM, Kassym Dorsel <k.dorsel / gmail.com> wrote: > I have this : > > ¨Βμασσ Στςεσσ > ¨Βεζ ιξιτιαμιϊε¨υσες¬ πασσ> ¨Βυσες υσες > ¨Βπασσ πασσ > ¨ΒαηεξΝεγθαξιϊε®ξεδο όα> ¨Β®υσεςίαηεξτίαμια§Χιξδοχσ Νοϊιμμα§ > ¨Β®θιστοςω®ναψίσιϊ> ¨Β®μοη νωίμοη > ¨Β®μοη®πςοηξανΐυσε> ¨Βξδ > ¨Βξδ > ¨Βεζ βςοχσε > ¨Βαηεξτ®μοη®πςοηξανε ΐυσε> open/close page > ¨Βξδ > ¨Βξδ > > ¨ΒωίμοΜοηηες®ξεχ¨§δυνπ®μοη§© > ¨Βωίμοη®μεφεΜοηηεςΊΊΔΕΒΥ> ¨ΒτοΝυτεψ®ξε> > ¨Βος ιξ ¨Αττενπτσίσταςτ®®Αττενπτσίεξδ© > ¨Βθςεαδσ ΌΌ Τθςεαδ®ξεχ¨Γςεδεξίβασε ι®τοίσδο όυσεςό > ¨ΒτςεσΣτςεσσ®ξεχ¨υσες¬ υσες> ¨Βος ιξ ¨°®®Αττενπτσίςερδο > ¨Βτον®σωξγθςοξιϊϋστςεσσ®βςοχσεθατο βε ατονιγ > ¨Βξδ > ¨Βξδ > ¨Βξδ > > The above code correctly identifies the different threads by the user by > setting the progname, but the problem is I have to use the Mutex class > to synchronize it, thus loosing the parallel computing since I have to > wait for the request to be sent and received before continuing. > > Is there a way to do this without using the Mutex class. Have the > progname set on a per thread basis while running the threads in > real-time parallel. That depends on the implementation of the Logger you are using (which one btw.?). However, your lock has far too big scope. You only need to lock access to the shared resource (the Logger instance) - not the whole invocation of Stress#browse since you an instance of Stress per thread. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/