示例#1
0
 def __init__(self, space, state=None):
     self.space = space
     if state is None:
         state = AppCoroutine._get_state(space)
     Coroutine.__init__(self, state)
     self.flags = 0
     self.newsubctx()
示例#2
0
 def __init__(self, space, state=None):
     self.space = space
     if state is None:
         state = AppCoroutine._get_state(space)
     Coroutine.__init__(self, state)
     self.flags = 0
     self.newsubctx()
示例#3
0
 def __init__(self, space, w_callable=None, is_main=False):
     Coroutine.__init__(self, self._get_state(space))
     self.space = space
     self.w_callable = w_callable
     self.active = is_main
     self.subctx = space.getexecutioncontext().Subcontext()
     if is_main:
         self.subctx.clear_framestack()      # wack
     else:
         self.bind(GreenletThunk(self))
示例#4
0
 def __init__(self, space, w_callable=None, is_main=False):
     Coroutine.__init__(self, self._get_state(space))
     self.space = space
     self.w_callable = w_callable
     self.active = is_main
     self.subctx = space.getexecutioncontext().Subcontext()
     if is_main:
         self.subctx.clear_framestack()  # wack
     else:
         self.bind(GreenletThunk(self))
示例#5
0
 def switch(self):
     space = self.space
     try:
         Coroutine.switch(self)
     except CoroutineExit:
         raise OperationError(self.costate.w_CoroutineExit, space.w_None)