I ran into this strange problem when working with ruby timings (on rails). This time
timeout(10) do
//some code involving http calls that takes more than 10 seconds
end
does not work. But this timeout
timeout(20) do
timeout(10) do
//some code involving http calls that takes more than 10 seconds
end
end
expires in 20 seconds. I read that ruby timeout does not work properly if it is associated with system calls. If so, then any number of nested timeouts should also not work. Why will this work in the second timeout?
By the way, the link I called
http://ph7spot.com/musings/system-timer
Thanks in advance
source
share