Ruby ruby 中 EM.system () 方法的疑惑请教大神们

shlallen · August 08, 2014 · 2003 hits

exec_operation = proc do |process| …… end

exit_operation = proc do |_, status| …… end

Bundler.with_clean_env { EM.system("#{@ruby_path} -- #{prepare_script} true #{sh_command}", exec_operation, exit_operation) }

以上为代码部分:我想请教一下 EM.system("#{@ruby_path} -- #{prepare_script} true #{sh_command}", exec_operation, exit_operation) 的执行逻辑?

我现在的理解是肯定会去执行 exe_operation,貌似在 exec_operation 代码块中执行出问题的时候,会执行 exit_operation,请问是否是这样,或者具体的执行逻辑到底是怎么样的?

谢谢!

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.