Ginés Martínez Sánchez avatar Ginés Martínez Sánchez committed b83da75 Draft

changed mt_process() to run_forever() PEP 3156

Comments (0)

Files changed (14)

ginsfsm/examples/essential_gobjs/ongconnex.py

         url2=args.url2,
     )
     try:
-        ga.mt_process()
+        ga.run_forever()
     except (KeyboardInterrupt, SystemExit):
         print('Program stopped')

ginsfsm/examples/essential_gobjs/ongsock.py

         url=args.url,
     )
     try:
-        ga.mt_process()
+        ga.run_forever()
     except (KeyboardInterrupt, SystemExit):
         print('Program stopped')

ginsfsm/examples/essential_gobjs/ontimer.py

         seconds=args.seconds,
         command=''.join(args.command) or 'ls')
     try:
-        ga.mt_process()
+        ga.run_forever()
     except (KeyboardInterrupt, SystemExit):
         print('Program stopped')

ginsfsm/examples/essential_gobjs/stress_client_echo.py

     )
 
     try:
-        ga_cli.mt_process()
+        ga_cli.run_forever()
     except (KeyboardInterrupt, SystemExit):
         from ginsfsm.c_sock import close_all_sockets
         close_all_sockets(ga_cli._socket_map)

ginsfsm/examples/essential_gobjs/stress_server_echo.py

     )
 
     try:
-        ga_srv.mt_process()
+        ga_srv.run_forever()
     except (KeyboardInterrupt, SystemExit):
         print('Program stopped')

ginsfsm/examples/http/simple_http_server.py

     )
 
     try:
-        ga_srv.mt_process()
+        ga_srv.run_forever()
     except (KeyboardInterrupt, SystemExit):
         print('Program stopped')

ginsfsm/examples/router/test_router.py

     }
     ga = gaplic1({}, **local_conf)
     try:
-        ga.mt_process()
+        ga.run_forever()
     except (KeyboardInterrupt, SystemExit):
         print('Program stopped')

ginsfsm/examples/router/test_router_with_pyramid.py

     )
 
     try:
-        ga.mt_process()
+        ga.run_forever()
     except (KeyboardInterrupt, SystemExit):
         print('Program stopped')

ginsfsm/examples/sockjs/test_sockjs_server.py

     )
 
     try:
-        ga.mt_process()
+        ga.run_forever()
     except (KeyboardInterrupt, SystemExit):
         print('Program stopped')

ginsfsm/examples/wsgi/multiple_wsgi_server.py

     ga = main({}, **local_conf)
 
     try:
-        ga.mt_process()
+        ga.run_forever()
     except (KeyboardInterrupt, SystemExit):
         print('Program stopped')

ginsfsm/examples/wsgi/simple_wsgi_server.py

     ga = main({}, **local_conf)
 
     try:
-        ga.mt_process()
+        ga.run_forever()
     except (KeyboardInterrupt, SystemExit):
         print('Program stopped')

ginsfsm/gaplic.py

 * :meth:`GAplic.find_unique_gobj`
 * :meth:`GAplic.subscribe_external_event`
 * :meth:`GAplic.add_callback`
-* :meth:`GAplic.mt_process`
+* :meth:`GAplic.run_forever`
 * :meth:`GAplic.mt_subprocess`
 * :meth:`GAplic.start`
 * :meth:`GAplic.shutdown`
     :members: create_gobj, destroy_gobj,
         find_unique_gobj,
         subscribe_external_event,
-        mt_process, mt_subprocess,
+        run_forever, mt_subprocess,
         add_callback,
         start, shutdown
 
             ga = GAplic(name='Example1')
             ga.create_gobj('test_aplic', GPrincipal, None)
             try:
-                ga.mt_process()
+                ga.run_forever()
             except KeyboardInterrupt:
                 print('Program stopped')
 
 
         return remain
 
-    def mt_process(self):
+    def run_forever(self):
         """ Start the infinite loop function.
         """
         self.start()
     def run(self):
         """ start the main loop
         """
-        self.gaplic.mt_process()
+        self.gaplic.run_forever()
 
     def join(self, timeout=10.0):   # wait until 10 seconds for thread killed.
         """ Wait for worker to shutdown, until ``timeout`` seconds."""
     def run(self):
         """ start the main loop
         """
-        self.gaplic.mt_process()
+        self.gaplic.run_forever()
 
     def join(self, timeout=10.0):   # wait until 10 seconds for process killed.
         """ Wait for worker to shutdown, until ``timeout`` seconds."""

ginsfsm/tests/test_gaplic1.py

         ret = self.principal.send_event(self.principal, 'EV_QUERY', data=data)
         self.assertEqual(ret, None)
         self.assertEqual(len(self.principal.dl_query), 1)
-        #self.gaplic.mt_process()
+        #self.gaplic.run_forever()
         self.gaplic._loop()
         self.gaplic._loop()
         state = self.principal.get_current_state()
         self.assertEqual(state, 'ST_IDLE')
         self.assertEqual(len(self.principal.dl_query), 1)
-        #self.gaplic.mt_process()
+        #self.gaplic.run_forever()
         self.gaplic._loop()
         self.gaplic._loop()
         self.assertEqual(len(self.principal.dl_query), 0)

ginsfsm/tests/test_timer.py

     ga = MyGAplic('TestGAplic')
     ga.create_gobj('principal', GPrincipal, None)
     try:
-        ga.mt_process()
+        ga.run_forever()
     except KeyboardInterrupt:
         print('Program stopped')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.