Created on 2024-07-13.00:00:00 last changed 2 months ago
(From submission #575.)
According to 9.5.4 [dcl.fct.def.coroutine] paragraph 11:
The coroutine state is destroyed when control flows off the end of the coroutine or the destroy member function (17.12.4.6 [coroutine.handle.resumption]) of a coroutine handle (17.12.4 [coroutine.handle]) that refers to the coroutine is invoked.
Considering the as-if code in 9.5.4 [dcl.fct.def.coroutine] paragraph 5, if an exception occurs at any point before initial-await-resume-called becomes true, then there is no requirement to destroy the coroutine state, nor is the coroutine ever suspended. Consequently, the coroutine state is necessarily leaked. It is unclear whether that is intentional.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-07-13 00:00:00 | admin | create |