From: Jake McArthur Date: 2006-05-12T01:00:49+09:00 Subject: Re: Slowing threads Insert the following code somewhere in your main thread: class Thread attr_accessor :execution_speed end def set_execution_speed(seconds_per_line) Thread.current.execution_speed = seconds_per_line set_trace_func proc { |event, file, line, id, binding, classname| if event == "line" and !Thread.current.execution_speed.nil? sleep Thread.current.execution_speed end } end Then, at the beginning of any thread you want slowed down, call the set_execution_speed method. This will limit the rate that each line of code in the thread is executed. You can also modify the method so that it limits based on other criteria such as method calls. - Jake McArthur