Commits

Sébastien Martinez  committed 6af83bb

Updating examples to comply with cutomizable update methods

  • Participants
  • Parent commits 5c4f7ae
  • Branches start_mechanisms

Comments (0)

Files changed (11)

File examples/heap/dynamicML/update.py

 
 l = sys.modules["__main__"].threads
 pymoult.controllers.set_update_function(myupdate,l[0])
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,l[0])
 
 

File examples/heap/eager/update.py

 
 l = sys.modules["__main__"].threads
 pymoult.controllers.set_update_function(myupdate,l[0])
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,l[0])
 
 

File examples/products/products_update_v2.py

 site_update_function = pymoult.heap.tools.eager_class_update(sys.modules["__main__"].Site,SiteV2)
 #We execute the eager update in the manager thread
 pymoult.controllers.set_update_function(site_update_function,manager_thread)
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,manager_thread)
 
 #Function updates
 #################
 socket_update_function = pymoult.stack.tools.safe_redefine("do_command",new_do_command,"__main__")
 
 pymoult.controllers.set_update_function(socket_update_function,socket_thread)
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,socket_thread)
 
-

File examples/products/products_update_v3.py

 manager_update_function = pymoult.stack.tools.reboot_thread(new_manager_main)
 
 pymoult.controllers.set_update_function(manager_update_function,manager_thread)
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,manager_thread)
 
 
+

File examples/stack/reboot/update.py

 
 l = sys.modules["__main__"].threads 
 pymoult.controllers.set_update_function(myupdate,l[0])
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,l[0])

File examples/stack/reboot/update2.py

 
 l = sys.modules["__main__"].threads 
 pymoult.controllers.set_update_function(myupdate2,l[0])
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,l[0])

File examples/stack/recaml/update.py

 
 l = sys.modules["__main__"].threads
 pymoult.controllers.set_update_function(update_fib,l[0])
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,l[0])
 

File examples/stack/safe-redefine/update.py

 
 l = sys.modules["__main__"].threads 
 pymoult.controllers.set_update_function(myupdate,l[0])
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,l[0])

File examples/threads/dynamic-threads/update1.py

 
 threads = sys.modules["__main__"].threads
 pymoult.controllers.set_update_function(myupdate,threads[0])
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,threads[0])
 
 newthreads = pymoult.controllers.start_active_threads(None,sys.modules["__main__"].genMain(3))
 pymoult.controllers.register_threads(newthreads)

File examples/threads/dynamic-threads/update2.py

 
 threads = sys.modules["__main__"].threads
 pymoult.controllers.set_update_function(myupdate,threads[2])
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,threads[2])
 

File examples/threads/multi-thread/update.py

 pymoult.controllers.set_update_function(myupdate1,l[0])
 pymoult.controllers.set_update_function(myupdate2,l[1])
 pymoult.controllers.set_update_function(myupdate3,l[2])
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,l[0])
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,l[1])
+pymoult.controllers.set_update_method(pymoult.controllers.self_update,l[2])