-# 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.
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):
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()
________ __________
| Sender |===============| Receiver |
|________| Link1 |__________|
-
+
"""
zone = NetZone.create_full_zone("Zone1")
sender = zone.create_host("sender", 1).seal()