Restioson

Results 199 comments of Restioson

By the way, could you elaborate on the usecase mentioned for cancellation safety in https://github.com/launchbadge/sqlx/issues/2054

> Sure. For the mentioned fix to work, I need to make sure that send_async does not send the message when it's cancelled. If that would not be the case...

> Yes exactly. That could create the opposite problem - we could end up executing ROLLBACK without the corresponding BEGIN. In theory, maybe the worker can keep track of whether...

Just to clarify, if the channel has capacity, send async will return in one poll. So, this behavior of waiting only applies to when there is no capacity in the...

Oops sorry, that was an accidental close :sweat_smile:

> It also weakens the guarantees of having a bounded channel as, if I understand correctly, you could essentially do tx.send_async(item).now_or_never() in a loop to get unbounded behavior. This is...

> I think it's highly surprising that a send_async() operation can be cancelled but still go through, that could easily lead to some very subtle bugs. If nothing else, that...

I think that change should work. We can also change the lifetime param on `into_send_async` and other functions to `'a`.

+1. This would let the library support Windows (which I wish it did!)

Whoops, made a typo - meant windows :smile: