Closed
Description
#317 goes a little too far: while the Nursery.__aexit__
method is not itself a cancel point, if we've nursery.start_soon()
'd any tasks, we should presume that they do contain cancel points and thus avoid raising ASYNC100
. demo:
import time, trio
@trio.run
async def main():
with trio.fail_after(0.1): # raises TooSlowError despite ASYNC100 lint
async with trio.open_nursery() as n:
time.sleep(1) # noqa
n.start_soon(trio.lowlevel.checkpoint)
As a quick workaround, it'd be good to remove the special handling for nurseries/taskgroups; longer term we could bring it back only for nurseries that don't contain a .start_soon()
.