在 Ruby 中,模块可以包含其他模块,作为多重继承的一种形式。为了测试这一点,我根据 C3 线性化文章中的示例编写了以下程序:
module O
def doIt()
super if defined?(super)
puts "O"
end
end
module F
include O
def doIt()
super if defined?(super)
puts "F"
end
end
module E
include O
def doIt()
super if defined?(super)
puts "E"
end
end
module D
include O
def doIt()
super if defined?(super)
puts "D"
end
end
module C
include F
include D
def doIt()
super if defined?(super)
puts "C"
end
end
module B
include E
include D
def doIt()
super if …Run Code Online (Sandbox Code Playgroud) 我参与了一个看起来非常适合Akka演员的应用程序的设计.在该系统中,并非所有消息都需要可靠地传递.在某些情况下,丢失信息的后果相对较小,在其他情况下,后果会有些严重.
我从Akka文档中了解到远程消息传递不可靠,并且存在提供可靠消息传递的模式.
但是,在某些情况下,还有其他方法可以处理交付失败,特别是如果它不是常见的情况.我想了解一下在实践中消息传递的不可靠性,以及典型的配置和标准传输.
我正在寻找以下内容:
Terminated观看演员的消息如果它取决于配置,它依赖于什么?