A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Doc improvement in this example
[simgrid.git]
/
examples
/
python
/
actor-create
/
actor-create.py
diff --git
a/examples/python/actor-create/actor-create.py
b/examples/python/actor-create/actor-create.py
index
3bd71d5
..
4bb1d52
100644
(file)
--- a/
examples/python/actor-create/actor-create.py
+++ b/
examples/python/actor-create/actor-create.py
@@
-63,6
+63,8
@@
class Sender:
self.msg = msg
self.mbox = mbox
self.msg = msg
self.mbox = mbox
+ # 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):
this_actor.info("Hello s4u, I have something to send")
mailbox = Mailbox.by_name(self.mbox)
def __call__(self):
this_actor.info("Hello s4u, I have something to send")
mailbox = Mailbox.by_name(self.mbox)
@@
-72,7
+74,7
@@
class Sender:
if __name__ == '__main__':
if __name__ == '__main__':
- """Here comes the main function of your program"""
+ # Here comes the main function of your program
# When your program starts, you have to first start a new simulation engine, as follows
e = Engine(sys.argv)
# When your program starts, you have to first start a new simulation engine, as follows
e = Engine(sys.argv)