I'm using the the mongodb reactive driver in a project with a lot of coroutines/suspending stuff. I was thinking it might be nice to wrap the session/transaction handling in some kind of coroutine context that can both ensure rollback etc in case of cancellations/error and possibly provide the current session to the code using the client directly.
Does this seem like a sensible idea and does anyone have any examples of similar solutions?