Closed PNixx closed 1 year ago
await
short-circuits on exceptions by design, so the proposed change isn't going to be merged as is. I'm not sure why it hangs, but I'm also not sure how concurrency safe these transaction objects are.
I just tested with the latest commit from the 2.x
branch and did not observe any hanging behavior. I'm not certain, but the reason may be linked to https://github.com/amphp/amp/pull/395, which would allow the GC of the result and transaction objects, preventing the hang. For some silly reason we didn't tag a version of amphp/amp
with that commit until November, so it makes sense you'd have still seen the old behavior in October.
I'm closing this issue then as I believe this has been fixed. Thanks for reporting! 👍
Example file:
testAwait
- completes successfully, buttestAwaitMultiple
hangs constantly waiting on the line$this->transaction->rollbackTo('phpunit_savepoint');
intearDown
method.I think need modify await function to: