有的说代码结束前要加api.close(),否则出错。

但是,我在天勤的异步代码案例中,就找不到api.close()

请问。异步代码如果需要加api.close(),应该放在哪个位置合适?是与
async with api.register_update_notify() as update_chan: 左对齐?还是应当与
async for _ in update_chan:左对齐、
cc9200 已回答的问题 2026年1月27日
https://blog.csdn.net/cc9200/article/details/157441586?sharetype=bloghttps://blog.csdn.net/cc9200/article/details/157441586?sharetype=blogdetail&sharerId=157441586&sharerefer=PC&sharesource=cc9200&spm=1011.2480.3001.8118detail&sharerId=157441586&sharerefer=PC&sharesource=cc9200&spm=1011.2480.3001.8118
cc9200 已回答的问题 2026年1月27日