⚲
Project
Overview
Activity
Roadmap
Issues
Repository
Like
General
Home
Projects
Help
Profile
Sign in
Register
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Download (353 Bytes)
Bug #13941
» test.rb
Test script -
graywolf (Gray Wolf)
, 09/26/2017 12:10 AM
#!/usr/bin/env ruby
require
'thread'
def
beat_thread
$stop
=
false
bt
=
Thread
.
new
do
loop
do
print
"."
sleep
0.25
break
if
$stop
end
end
yield
$stop
=
true
bt
.
join
end
puts
"File exist?:"
beat_thread
{
File
.
exist?
'blocking_dir/file54'
}
puts
puts
"File read:"
beat_thread
{
File
.
read
'blocking_dir/file54'
}
« Previous
1
2
3
4
Next »
(3-3/4)
Loading...