Other instances in which this pattern is useful include logging and printing, such as when you want only one instance of a class to access and control one particular printer at a time.
在其他实例中,此模式也是有用的,包括登录和打印,例如,当您想要一个能够每次访问并控制一个特别打印机的类实例。
The ServiceUI class provides a single method to display the printer selection dialog
ServiceUI类提供一个单独的方法来显示打印机选择对话框
Imagine that the name printer, complete with its synchronization protocol, is your concurrent class.
设想NamePrinter以及它的同步协议是并行类。
Imagine that the name printer, complete with its synchronization protocol, is your concurrent class.
设想NamePrinter以及它的同步协议是并行类。
应用推荐