mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
asyncio: Add gi_{frame,running,code} properties to CoroWrapper (upstream #163).
This commit is contained in:
parent
715ef02ddc
commit
0cbc76880f
2 changed files with 59 additions and 0 deletions
|
@ -63,6 +63,18 @@ class CoroWrapper:
|
|||
def close(self):
|
||||
return self.gen.close()
|
||||
|
||||
@property
|
||||
def gi_frame(self):
|
||||
return self.gen.gi_frame
|
||||
|
||||
@property
|
||||
def gi_running(self):
|
||||
return self.gen.gi_running
|
||||
|
||||
@property
|
||||
def gi_code(self):
|
||||
return self.gen.gi_code
|
||||
|
||||
def __del__(self):
|
||||
frame = self.gen.gi_frame
|
||||
if frame is not None and frame.f_lasti == -1:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue