def main(args): # create Group of Hello objects (one object exists and runs on each core) hellos = Group(Hello) # call method 'SayHi' of all group members, wait for method to be invoked on all f = charm.createFuture() hellos.SayHi(f) f.get() charm.exit()
def __init__(self, args): ro.mainProxy = self.thisProxy hellos = Group(hello.Hello) ro.byes = Group(goodbye.Goodbye) hellos.SayHi()
def __init__(self, args): # create Group of Hello objects (one object exists and runs on each core) hellos = Group(Hello) # call method 'SayHello' of all group members, passing proxy to myself hellos.SayHi(self.thisProxy)