-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
See DRIVERS-556 for details.
See also this comment thread with Jesse:
https://github.com/mongodb/mongo-python-driver/pull/411#discussion_r263559402
Motor should accept a coroutine as a callback, wrap that in another callback which schedules the coroutine on the event loop and waits (blocking this thread) until the coroutine finishes, then passes back its return value or reraises its exception, unblocking this thread.
Once it's wrapped the coroutine in the wrapper callback, Motor will do its usual thing: schedule PyMongo's with_transaction() on the Motor thread pool and return a Future that's resolved when with_transaction() finishes.
- depends on
-
PYTHON-1671 Implement Convenient API for Transactions
- Closed
- is depended on by
-
DRIVERS-556 Implement Convenient API for Transactions
- Development Complete
-
MOTOR-370 Provide transaction example using new withTransaction API
- Closed
- related to
-
MOTOR-344 Allow applications to set maxTimeMS for commitTransaction
- Closed
- tested by
-
MOTOR-443 Implement prose tests for convenient API for Transactions
- Closed