#5632: Problems with DB objects on a multithreaded scenario
----------------------------------------------------------------+-----------
Reporter: [EMAIL PROTECTED] (alias PyMan) | Owner: nobody
Status: new |
Component: Database wrapper
Version: SVN |
Resolution:
Keywords: multi thread db |
Stage: Unreviewed
Has_patch: 0 |
Needs_docs: 0
Needs_tests: 0 |
Needs_better_patch: 1
----------------------------------------------------------------+-----------
Comment (by ikelly):
Please use the syntax "get_or_create = mutex(get_or_create)" for your
decorators rather than the "@mutex" syntax. The reason for this is that
the @ syntax is not supported in Python 2.3.
Also, please don't put your name in the code. If you want to be credited
for your contributions, that's fine, but the proper place for it is in the
AUTHORS file. See http://www.djangoproject.com/documentation/contributing
/#coding-style for more information.
On a more stylistic note, this code:
{{{
try:
res = func(*args, **kwargs)
except:
__serializer.release()
raise
__serializer.release()
}}}
is exactly equivalent to this:
{{{
try:
res = func(*args, **kwargs)
finally:
__serializer.release()
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/5632#comment:2>
Django Code <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
-~----------~----~----~----~------~----~------~--~---