本文整理汇总了Python中pants.engine.storage.Storage.clone方法的典型用法代码示例。如果您正苦于以下问题:Python Storage.clone方法的具体用法?Python Storage.clone怎么用?Python Storage.clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pants.engine.storage.Storage
的用法示例。
在下文中一共展示了Storage.clone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _process_initializer
# 需要导入模块: from pants.engine.storage import Storage [as 别名]
# 或者: from pants.engine.storage.Storage import clone [as 别名]
def _process_initializer(node_builder, storage):
"""Another picklable top-level function that provides multi-processes' initial states.
States are returned as a tuple. States are `Closable` so they can be cleaned up once
processes are done.
"""
return (node_builder, Storage.clone(storage))
示例2: _process_initializer
# 需要导入模块: from pants.engine.storage import Storage [as 别名]
# 或者: from pants.engine.storage.Storage import clone [as 别名]
def _process_initializer(storage):
"""Another picklable top-level function that provides multi-processes' initial states.
States are returned as a tuple. States are `Closable` so they can be cleaned up once
processes are done.
"""
storage = Storage.clone(storage)
return (storage, Cache.create(storage=storage))