⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (372 Bytes)
Bug #10443
» rb-mutex-unlock-fork-test.rb
benweint (Ben Weintraub)
, 10/28/2014 03:41 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
$lock
.
synchronize
do
end
exit
0
end
end
« Previous
1
2
3
Next »
(1-1/3)
Loading...