Skip to content

Commit d7e344d

Browse files
author
Adam Hrbac
committed
Use the correct close behaviour for athrow
1 parent a91d687 commit d7e344d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/asyncio/AsyncGenThrowBuiltins.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,9 @@ public Object doThrow(VirtualFrame frame, PAsyncGenAThrow self, Object arg1, Obj
284284
@GenerateNodeFactory
285285
public abstract static class Close extends PythonUnaryBuiltinNode {
286286
@Specialization
287-
public static Object close(VirtualFrame frame, PAsyncGenAThrow self,
288-
@Cached Throw throwNode) {
289-
// TODO check on this
290-
return throwNode.execute(frame, self, PNone.NONE, PNone.NO_VALUE, PNone.NO_VALUE);
287+
public static Object close(PAsyncGenAThrow self) {
288+
self.setState(AwaitableState.CLOSED);
289+
return PNone.NONE;
291290
}
292291
}
293292
}

0 commit comments

Comments
 (0)