()
| 796 | connections_dict[id(connection)] = connection |
| 797 | |
| 798 | def runner(): |
| 799 | # Passing django.db.connection between threads doesn't work while |
| 800 | # connections[DEFAULT_DB_ALIAS] does. |
| 801 | from django.db import connections |
| 802 | |
| 803 | connection = connections[DEFAULT_DB_ALIAS] |
| 804 | # Allow thread sharing so the connection can be closed by the |
| 805 | # main thread. |
| 806 | connection.inc_thread_sharing() |
| 807 | with connection.cursor(): |
| 808 | pass |
| 809 | connections_dict[id(connection)] = connection |
| 810 | |
| 811 | try: |
| 812 | for x in range(2): |
nothing calls this directly
no test coverage detected