Hi Oleg

> On Fri, Jul 06, 2007 at 03:50:24PM +0200, bernhard.maeder@zkb.ch wrote:
> > My hacky solution is to not acquire the class's lock in __init__(), when in
> > the process of fetching an instance:
> >
> > def threadSafeMethod(lock):
> >     def decorator(fn):
> >         def _wrapper(self, *args, **kwargs):
> >
> >             if '_SO_fetch_no_create' in kwargs:
> >                 return fn(self, *args, **kwargs)
>
>    Does the solution work in the long run?


Seems like it. I haven't had a single lockup since then, and no negative side-effects either.

Bernhard


___________________________________________________________________

Disclaimer:


Diese Mitteilung ist nur fuer die Empfaengerin / den Empfaenger bestimmt.

Fuer den Fall, dass sie von nichtberechtigten Personen empfangen wird, bitten wir diese hoeflich, die Mitteilung an die ZKB zurueckzusenden und anschliessend die Mitteilung mit allen Anhaengen sowie allfaellige Kopien zu vernichten bzw. zu loeschen. Der Gebrauch der Information ist verboten.


This message is intended only for the named recipient and may contain confidential or privileged information.

If you have received it in error, please advise the sender by return e-mail and delete this message and any attachments. Any unauthorised use or dissemination of this information is strictly prohibited.