On Tuesday, July 12, 2016 at 9:25:37 AM UTC+2, Aymeric Augustin wrote: > > Can you check the condition inside the lock? The following pattern seems > simpler to me: >
The standard pattern in such cases is to check inside and outside. Outside to avoid the lock if you already populated (the majority of requests) and inside to see if another thread populated it in the time you waited to get the lock⦠-- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e4a55afc-b7d5-4a9b-88d5-2a80cb528756%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
