Commits

Nick.Vatamaniuc  committed fc06af4

Do not create extra greenlet during cast

  • Participants
  • Parent commits 2017eec

Comments (0)

Files changed (1)

File pyact/actor.py

         """
         self._mailbox.append(json.loads(message, object_hook=generate_address))
         if self._waiting:
-            hub = hubs.get_hub()
-            g = greenlet.greenlet(self.switch, parent=hub.greenlet)
-            hub.schedule_call_global(0,g.switch)
+            hub.schedule_call_global(0,self.switch)
 
 
 class Server(Actor):