⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (508 Bytes)
Bug #12298
» 12998.rb
Reduced test case -
drbrain (Eric Hodel)
, 04/19/2016 06:46 PM
DELAY
=
2
Thread
.
abort_on_exception
=
true
def
run
loop
{
work
}
rescue
Exception
puts
"
#{
Time
.
now
}
Exception"
ensure
puts
"
#{
Time
.
now
}
stopping agent"
end
def
work
puts
"
#{
Time
.
now
}
start work"
sleep
puts
"finished work"
rescue
puts
"
#{
Time
.
now
}
Error"
ensure
puts
"
#{
Time
.
now
}
start sleep"
sleep
(
DELAY
)
puts
"
#{
Time
.
now
}
finished sleep"
end
t
=
Thread
.
new
{
run
}
at_exit
do
puts
"
#{
Time
.
now
}
killing thread"
Thread
.
kill
(
t
)
puts
"
#{
Time
.
now
}
killed thread"
end
sleep
2
exit
« Previous
1
2
3
Next »
(3-3/3)
Loading...