X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/60a81418ae15d47b18247171b721e207b71d6279..ea74f5d95928a521a588737e81f1de94eef25d19:/examples/python/network-nonlinear/network-nonlinear.py diff --git a/examples/python/network-nonlinear/network-nonlinear.py b/examples/python/network-nonlinear/network-nonlinear.py index 69f39eb4fc..66a4a97b78 100644 --- a/examples/python/network-nonlinear/network-nonlinear.py +++ b/examples/python/network-nonlinear/network-nonlinear.py @@ -1,4 +1,4 @@ -# Copyright (c) 2006-2021. The SimGrid Team. All rights reserved. +# Copyright (c) 2006-2022. The SimGrid Team. All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the license (GNU LGPL) which comes with this package. @@ -17,7 +17,7 @@ class Sender: def __init__(self, msg_count: int, msg_size=int(1e6)): self.msg_count = msg_count self.msg_size = msg_size - + # Actors that are created as object will execute their __call__ method. # So, the following constitutes the main function of the Sender actor. def __call__(self): @@ -57,7 +57,7 @@ class Receiver: comm, data = mbox.get_async() pending_comms.append(comm) pending_msgs.append(data) - + while len(pending_comms) > 0: index = Comm.wait_any(pending_comms) msg = pending_msgs[index].get() @@ -88,7 +88,7 @@ def load_platform(): ________ __________ | Sender |===============| Receiver | |________| Link1 |__________| - + """ zone = NetZone.create_full_zone("Zone1") sender = zone.create_host("sender", 1).seal()