#18251: multithreading deadlock in django.models.loading.get_apps
------------------------------+------------------------------------
     Reporter:  harm          |                    Owner:  nobody
         Type:  Bug           |                   Status:  new
    Component:  Core (Other)  |                  Version:  1.3
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Accepted
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+------------------------------------

Comment (by akaariai):

 I think it is safe. The reason is that if B has the import lock, then A's
 imp.acquire_lock() will block. This is fine, as B can still continue
 working. If B goes into loading._populate, it has already the import lock,
 and can bypass A, take the write_lock, and proceed with app loading. If B
 just finishes its import, it will release the import lock, A can continue
 and again all fine.

 Actually, to me it seems the write_lock is redundant in this case.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18251#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to