9 | | '''Django core is generally threadsafe as of 1.0.3 / 1.1'''. However, `QuerySet`s are known not to be thread-safe, see #11906. Usually that does not pose problems as they are (or should be) not shared between threads in Django. The exception to that rule is the use of exotic global/class-level/shared instance variable querysets in your own code (e.g. when using the ORM outside of the Django dispatch system), where you are assumed to know what you are doing and protect them appropriately anyway. |
| 9 | '''Django core is generally threadsafe as of 1.0.3 / 1.1'''. |
| 10 | |
| 11 | However, there are certain issues you have to keep in mind: |
| 12 | 1. `QuerySet`s are known not to be thread-safe, see #11906. Usually that does not pose problems as they are (or should be) not shared between threads in Django. The exception to that rule is the use of exotic global/class-level/shared instance variable querysets in your own code (e.g. when using the ORM outside of the Django dispatch system), where you are assumed to know what you are doing and protect them appropriately anyway. |
| 13 | 1. There is an edge case that can result in a deadlock during middleware loading, see #11193. This will trigger only when the setup is invalid and won't generally harm you. |