def broadcast(self, v): self.start() from dpark.broadcast import Broadcast return Broadcast(v)
def create_broadcast(name, obj, func_name): from dpark.broadcast import Broadcast logger.info("use broadcast for object %s %s (used in function %s)", name, type(obj), func_name) return Broadcast(obj)