mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/shell/process-controller.rb: removed commented-out code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f4e5a6f083
commit
1f48a3382b
2 changed files with 4 additions and 9 deletions
|
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Aug 26 11:44:04 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||||
|
|
||||||
|
* lib/shell/process-controller.rb: removed commented-out code.
|
||||||
|
|
||||||
Tue Aug 26 11:39:01 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
Tue Aug 26 11:39:01 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||||
|
|
||||||
* lib/thwait.rb (ThreadsWait): removed needless constant.
|
* lib/thwait.rb (ThreadsWait): removed needless constant.
|
||||||
|
|
|
||||||
|
|
@ -157,19 +157,16 @@ class Shell
|
||||||
@waiting_jobs.delete command
|
@waiting_jobs.delete command
|
||||||
else
|
else
|
||||||
command = @waiting_jobs.shift
|
command = @waiting_jobs.shift
|
||||||
# command.notify "job(%id) pre-start.", @shell.debug?
|
|
||||||
|
|
||||||
return unless command
|
return unless command
|
||||||
end
|
end
|
||||||
@active_jobs.push command
|
@active_jobs.push command
|
||||||
command.start
|
command.start
|
||||||
# command.notify "job(%id) post-start.", @shell.debug?
|
|
||||||
|
|
||||||
# start all jobs that input from the job
|
# start all jobs that input from the job
|
||||||
for job in @waiting_jobs.dup
|
for job in @waiting_jobs.dup
|
||||||
start_job(job) if job.input == command
|
start_job(job) if job.input == command
|
||||||
end
|
end
|
||||||
# command.notify "job(%id) post2-start.", @shell.debug?
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -254,7 +251,6 @@ class Shell
|
||||||
|
|
||||||
pid = fork {
|
pid = fork {
|
||||||
Thread.list.each do |th|
|
Thread.list.each do |th|
|
||||||
# th.kill unless [Thread.main, Thread.current].include?(th)
|
|
||||||
th.kill unless Thread.current == th
|
th.kill unless Thread.current == th
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -283,8 +279,6 @@ class Shell
|
||||||
rescue Errno::ECHILD
|
rescue Errno::ECHILD
|
||||||
command.notify "warn: job(%id) was done already waitpid."
|
command.notify "warn: job(%id) was done already waitpid."
|
||||||
_pid = true
|
_pid = true
|
||||||
# rescue
|
|
||||||
# STDERR.puts $!
|
|
||||||
ensure
|
ensure
|
||||||
command.notify("Job(%id): Wait to finish when Process finished.", @shell.debug?)
|
command.notify("Job(%id): Wait to finish when Process finished.", @shell.debug?)
|
||||||
# when the process ends, wait until the command terminates
|
# when the process ends, wait until the command terminates
|
||||||
|
|
@ -296,11 +290,8 @@ class Shell
|
||||||
redo
|
redo
|
||||||
end
|
end
|
||||||
|
|
||||||
# command.notify "job(%id) pre-pre-finish.", @shell.debug?
|
|
||||||
@job_monitor.synchronize do
|
@job_monitor.synchronize do
|
||||||
# command.notify "job(%id) pre-finish.", @shell.debug?
|
|
||||||
terminate_job(command)
|
terminate_job(command)
|
||||||
# command.notify "job(%id) pre-finish2.", @shell.debug?
|
|
||||||
@job_condition.signal
|
@job_condition.signal
|
||||||
command.notify "job(%id) finish.", @shell.debug?
|
command.notify "job(%id) finish.", @shell.debug?
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue