-
Type: New Feature
-
Resolution: Won't Do
-
Priority: Minor - P4
-
None
-
Affects Version/s: 0.1.0
-
Component/s: CRUD
-
None
In Go, a context.Context is goroutine safe, and users expect this to be true. A mongo.SessionContext is not goroutine safe, even though it's used as a context.Context when being passed to methods. This causes confusion for users. Additionally, it is not clear to users that the context created by the WithSession function or UseSession* methods should not escape the scope of the closure.
While it's likely to be usable by documenting that a mongo.SessionContext is not goroutine safe, it is likely that users will continue to attempt to use a mongo.SessionContext with goroutines, whether inside a closure or external to it.
- is related to
-
GODRIVER-3011 Docs around SessionContext and parallelism could be more explicit
- Ready for Work
- related to
-
GODRIVER-704 Document that mongo.SessionContext is not goroutine safe
- Closed