« Previous | Next » 

Revision 1c11bace


Added by Christos Stavrakakis almost 11 years ago

Re-implement select_for_update

Previous implementation of 'select_for_update' method was based on an
attribute of the 'ForUpdateManager'. However, the model manager is shared
between all threads, which lead to race conditions. This commit
reimplements 'select_for_update', by making it return a custom QuerySet
(ForUpdateQuerySet), which overrides the 'get' and 'filter' methods.


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences