Does action1 run on a different thread than the one the method was
called? Like:

def action1
  Thread.new do 
    #your code here
  end
end

Be wary that it might be that what happens inside action1 runs on a
different thread, just not explicitly like this, for example it might
call a library that runs its stuff on a separate thread. Could you show
more of what happens inside action1() ?

-- 
Andrea Dallera
http://github.com/bolthar/freightrain
http://usingimho.wordpress.com


On Thu, 2010-03-18 at 22:43 +0900, praveen praveen wrote:
> Hi,
> 
> My code is like this:
> 
> if (row.abc1== 'pnc')
> 
> 
>       action1
> 
> end
> 
> if (abc2 == 'hjayu')
> 
>        action2
> 
> end
> 
> Now the probelm is, before finishing the action1, it is going to perform
> action2 & resulting crashing the system.
> 
> what might be the problem, can somebody pls help
> 
> Thanks in advance
> apr