1 # Copyright (c) 2019-2022. The SimGrid Team. All rights reserved.
3 # This program is free software; you can redistribute it and/or modify it
4 # under the terms of the license (GNU LGPL) which comes with this package.
7 First failing example for bug #9 on Framagit (Python bindings crashing)
9 A heavy operation is added after e.run() (here, it's "import gc"). Note that
10 the failure only occurs when the actor "sender" starts first, and the
11 scheduling is interlaced: sender starts, receiver starts, sender terminates,
16 from simgrid import Engine, this_actor
19 this_actor.sleep_for(3)
20 this_actor.info("Goodbye now!")
23 this_actor.sleep_for(5)
24 this_actor.info("Five seconds elapsed")
26 if __name__ == '__main__':
29 e.load_platform(sys.argv[1]) # Load the platform description
31 # Register the classes representing the actors
32 e.register_actor("sender", sender)
33 e.register_actor("receiver", receiver)
35 e.load_deployment(sys.argv[2])
38 this_actor.info("Dummy import...")
41 this_actor.info("done.")