#11906: QuerySet._fill_cache is not thread-safe
------------------------------------------+---------------------------------
 Reporter:  mrts                          |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  SVN       
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 If several threads iterate over the same queryset, the following error
 occurs:

 {{{
 File "/some/path/__init__.py", line 624, in prerender
    for obj in objects: # <-- objects is a QuerySet

  File "/some/path/python2.5/site-packages/django/db/models/query.py", line
 106, in _result_iter
    self._fill_cache()

  File "/some/path/python2.5/site-packages/django/db/models/query.py", line
 692, in _fill_cache
    self._result_cache.append(self._iter.next())

 ValueError: generator already executing
 }}}

 That happens as multiple threads concurrently both append to
 `self._result_cahce` and consume `self._iter` (see
 source:/django/trunk/django/db/models/query...@11584#l692).

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11906>
Django <http://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