⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (339 Bytes)
Bug #10443
» rb-mutex-unlock-fork-test.rb
benweint (Ben Weintraub)
, 10/28/2014 07:03 PM
#!/usr/bin/env ruby
$lock
=
Mutex
.
new
10
.
times
do
Thread
.
new
do
Thread
.
current
.
abort_on_exception
=
true
loop
do
$lock
.
synchronize
do
end
end
end
end
loop
do
$stderr
.
write
'.'
child_pid
=
$lock
.
synchronize
do
Process
.
fork
end
if
child_pid
Process
.
wait
(
child_pid
)
else
exit
0
end
end
« Previous
1
2
3
Next »
(2-2/3)
Loading...